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

@:optionalallowed_tags:Null<String>

@:optionalcontextmenu:Null<String>

@:optionalextended_valid_elements:Null<String>

@:optionalformats:Null<String>

Choose which formats are available to use.

"formats": "Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;"

@:optionalhelp:Null<Dynamic>

Adding help or instructional text to a field.

"help": "This field can only contain letters."

@:optionalhidden:Null<Bool>

Hide this field in the interface.

"hidden": true

@:optionalmax_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": 160

@:optionalminimal:Null<Bool>

Hide the label of the textfield.

"minimal": true

@:optionaloverview:Null<Bool>

@:optionaloverview_editable:Null<Bool>

@:optionaloverview_filter:Null<Bool>

@:optionaloverview_searchable:Null<Bool>

@:optionalpaste_as_html:Null<Bool>

@:optionalprovides_metadata:Null<String>

Can prefill metadata like the title or the description.

"provides_metadata": "title"
"provides_metadata": "description"

@:optionalreadonly:Null<Bool>

Field is read only.

"readonly": true

@:optionalrequired:Null<Bool>

This field can't be empty.

"required": true

@:optionalshow_when:Null<EitherType<ShowOptions, Array<ShowOptions>>>

The "value" can be set to "null" of "!null" to check if something is empty.

@:optionalstyle_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"
     }
]

@:optionaltoolbar: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:

@:optionalvalue:Null<Any>

@:optionalwidth:Null<Float>

Width percentpoint 0-1.

"width": 0.5"