A wysiwyg is a field used to enter both textual and graphical content. It is a representation of what the content's appearance will be on the website.
{
"key": "text",
"label": "Text",
"type": "Wysiwyg",
"options": {
"toolbar": "undo redo | formatselect | bold italic | bullist numlist table blockquote | link unlink",
"formats": "Paragraph=p;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;"
}
}Properties
formats:Null<String>
Choose which formats are available to use.
"formats": "Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;"help:Null<Dynamic>
Adding help or instructional text to a field.
"help": "This field can only contain letters."max_length:Null<Int>
Can limit the length of the text field. There will be a counter to see how many characters you already have.
"max_length": 160provides_metadata:Null<String>
Can prefill metadata like the title or the description.
"provides_metadata": "title"
"provides_metadata": "description"show_when:Null<EitherType<ShowOptions, Array<ShowOptions>>>
The "value" can be set to "null" of "!null" to check if something is empty.style_formats:Null<Array<Dynamic>>
Set custom classes to the toolbar so you can use them inside the wysiwyg field.
"style_formats": [
{
"title": "Red text",
"inline": "span",
"classes": "red"
}
]toolbar:Null<String>
Choose which tools are available to use.
"toolbar": "undo redo | formatselect styleselect | bold italic subscript superscript | alignleft aligncenter alignright alignjustify | bullist numlist table blockquote | link unlink anchor | image media | removeformat pastetext code"See: