Skip to content
Grav 2.0 is officially stable. Read the announcement →
General

Flex objects -> render as Markdown

Started by Richard Scheglmann 6 years ago · 1 replies · 855 views
6 years ago

Hello,

i created a custom flex-object: "news" with custom fields. When i put Markdown in the fields the content is displayed in plain text, when i view the entries on i.e. website/flex-objects/directory:news.

I added the markdown twig:

TWIG
{% markdown %}
{% endmarkdown %}

in my default.html.twig of my news flex-object, but it didn´t work.

Can i use Markdown with flex-objects, or is the save to json the problem?

Thank you in advance

5 years ago

A late answer but it might be helpful. Add the markdown filter to the field like this:

{{ content|markdown }}

it should then render correctly.

Suggested topics

Topic Participants Replies Views Activity
General · by jean-louis67, 3 days ago
2 80 2 days ago
General · by Andy Miller, 6 days ago
0 145 6 days ago
General · by Veehem, 1 week ago
0 144 1 week ago
General · by milkboy, 1 week ago
0 138 1 week ago
General · by ian russell, 2 weeks ago
2 226 2 weeks ago