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.

Content & Markdown

Markdown is escaped when using HTML

Started by Hans Wurst 7 years ago · 2 replies · 1064 views
7 years ago

Dear community,

I am very new to Grav, so I do not know if my approach makes sense in the first place. I wanted to have a centerd heading and used the following code:

TXT
<center>#Heading</center> 

The rendered page outputs "#Heading" (centered), so the markdown syntax is somehow escaped. Using html completely (<H1.. etc.) works fine.

It would be great if some could help me out with this issue.

7 years ago

Hi @Olivander12, does <center># Heading</center> work? Markdown needs a space between the # and text for Header 1. Here is a Markdown guide that you might also find helpful: https://www.markdownguide.org/
Paul

👍 1
7 years ago

Hi Paul,

Thanks for your reply, but that did not solved the issue. The markdown syntax is still displayed escaped.

I could live with the additional html tags for centered headings, but I wanted to center multiple images, and I do not want the much longer html syntax for images.

Edit: I found the solution, it was simple: The markdown syntax has to be around the html tags. So ## <center> Text </center> works.

👍 1
last edited 08/02/19 by Hans Wurst

Suggested topics

Topic Participants Replies Views Activity
Content & Markdown · by Jochen, 8 months ago
6 97 8 months ago
Content & Markdown · by Ton Haarmans, 1 year ago
10 185 1 year ago
Content & Markdown · by Jan L'Am, 1 year ago
4 148 1 year ago
Content & Markdown · by Leonardo, 1 year ago
3 61 1 year ago
Content & Markdown · by belthasar, 1 year ago
4 255 1 year ago