Markdown
Field to store markdown content
The field of type markdown is used to store markdown code. It display a codemirror editor in the UI.
Example
{
name: "content",
type: "markdown",
}
Available options
In addition to the common options (see fields documentation for more info), this field has the following options:
upload
The name or array of names with the upload entities used to upload files or get files from. If it's not defined, all uploads options will be used.
{
name: "content",
type: "markdown",
upload: "images"
}
Set to false to disable this option:
{
name: "content",
type: "markdown",
upload: false
}
snippets
An array of custom snippets to insert in the code. Each snippet has a label and a value. The value can contain the {$} placeholder that will be replaced by the currently selected text.
{
name: "content",
type: "markdown",
snippets: [
{
label: "copyright",
value: "© Acme Inc, 2025"
},
{
label: "Keyboard input",
value: "<kbd>{$}</kbd>"
},
]
}
relativePath
Use this option to store the links to uploaded files as a relative path to the document. This option only affects how the path is written in the actual source, end users will not notice it when editing the document.
{
name: "content",
type: "markdown",
upload: "images",
relativePath: true
}