Markdown Field Type
Additional attributes, defaults, and usage example for markdown fields.
Usage Example
Here is an example that shows a body
field on a page.
1
2
3
4
5
6
7
8
9
10
This will render a preview in the page editor.
Clicking on the preview will open the rich markdown editor in a modal, with an option to toggle between rich text and raw markdown.
Transforming Markdown to HTML
A markdown field explicitly stores a string in markdown syntax. It is not converted to HTML to allow for maximum flexibility to serve your codebase.
Your code should expect a markdown string and have a mechanism for converting the markdown to HTML for proper rendering.