Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Flex objects -> render as Markdown

Started by Richard Scheglmann 7 years ago · 1 replies · 1079 views
7 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

6 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 themetman, 23 hours ago
2 40 16 hours ago
General · by Hanns Mattes, 1 week ago
0 121 1 week ago
General · by Karmalakas, 1 week ago
2 185 1 week ago
General · by Hanns Mattes, 3 weeks ago
0 235 3 weeks ago
General · by Dima, 4 weeks ago
1 211 4 weeks ago