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

Changing text style in post?

Started by Muut Archive 11 years ago · 1 replies · 288 views
11 years ago

can I somehow add class, when writing text in admin panel content box,
to change the way text is styled? if yes, how?

11 years ago

You can use HTML in the content area by default because it's supported in markdown. Some caveats though:

1) You cannot by default use markdown inside HTML. Once it detects HTML, everything to the closing tag of the opening tag is considered HTML and is not processed by markdown.

2) You can actually use markdown inside HTML if you enable markdown extra and put markdown="1" in the HTML tag surrounding the markdown you want to process. See markdown extra docs for more info. https://michelf.ca/projects/php-markdown/extra/#markdown-attr

3) With markdown extra you can add HTML classes to some things like HTML headers: https://michelf.ca/projects/php-markdown/extra/#spe-attr

4) You can disable Markdown completely and just use 100% pure HTML in your content area.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1350 9 years ago
Archive · by Muut Archive, 9 years ago
2 934 9 years ago
Archive · by Muut Archive, 9 years ago
2 4060 9 years ago
Archive · by Muut Archive, 9 years ago
1 2947 9 years ago
Archive · by Muut Archive, 9 years ago
3 1118 9 years ago