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.
Supported Typography
The following typographical styles and elements are supported:
- Headings
- Emphasis (strong, italic)
- Inline code, code blocks
- Subscript, superscript
- Alignment (left, center, right)
- Lists (ordered, unordered)
- Tables with row/column controls
- Links
- Images
Uploaded Images
Images uploaded or selected while using the markdown editor use the default asset source.
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.