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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

General

Flex objects -> render as Markdown

Started by Richard Scheglmann 6 years ago · 1 replies · 777 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 Jerry Hunt, 4 days ago
2 99 16 hours ago
General · by pamtbaau, 21 hours ago
1 63 21 hours ago
General · by Andy Miller, 1 day ago
0 48 1 day ago
General · by Marcel, 12 months ago
6 357 5 days ago
General · by Duc , 6 days ago
3 45 6 days ago