Markdown Field
The Markdown field type is an alias of the RichText field type, available for backward compatibility with Netlify/Decap CMS. It provides a rich text editor that allows content editors to create and format content using Markdown syntax.
The widget property for this field type is markdown.
See the RichText field documentation for details on the UI, data type, and available options.
Examples
Standard Markdown Field
This example shows a basic Markdown editor with default settings.
- name: body
label: Body
widget: markdown[[fields]]
name = "body"
label = "Body"
widget = "markdown"{
"name": "body",
"label": "Body",
"widget": "markdown"
}{
name: 'body',
label: 'Body',
widget: 'markdown',
}Output example:
# Welcome to the Markdown Field
This is a sample paragraph in **Markdown** format.
- Item 1
- Item 2body: |
# Welcome to the Markdown Field
This is a sample paragraph in **Markdown** format.
- Item 1
- Item 2body = """
# Welcome to the Markdown Field
This is a sample paragraph in **Markdown** format.
- Item 1
- Item 2
"""{
"body": "# Welcome to the Markdown Field\n\nThis is a sample paragraph in **Markdown** format.\n\n- Item 1\n- Item 2\n"
}We have included a Markdown example output along with YAML, TOML, and JSON representations because a field named body with the Markdown field type would be stored outside of the frontmatter in a Markdown file. If the name of the field were different, the content would be stored in the frontmatter instead.