Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Flex objects -> render as Markdown

Started by Richard Scheglmann 7 years ago · 1 replies · 978 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 Andy Miller, 7 days ago
0 114 7 days ago
General · by lynbor, 1 month ago
3 443 2 weeks ago
General · by lynbor, 3 weeks ago
7 562 2 weeks ago
General · by Harry, 2 weeks ago
0 162 2 weeks ago
General · by Old Man Umby, 1 month ago
2 309 4 weeks ago