Code
API
This component extends the native <div> API. That's why the className prop is not included in the table.
variant
'default' | 'full-width'
β
layout
'wrap' | 'overflow'
β
centeredToolbar
boolean
β
defaultContent
ReactNode | string
β
content
ReactNode | string
β
macros
string[]
β
onChange
(e: { html?: string; text?: string; markdown?: string }) => void;
β
layout
The way the toolbar behaves. If 'wrap' then elements are wrapped, if not an automatic overflow is shown.
You can use this prop ONLY if the variant passed is full-width, and the viewport is large. Otherwise, an overflow is passed when rendering smaller viewports.
defaultContent and content
The defaultContent prop is used to render the initial content. The content prop, is normally a state connected to the onChange listener, which updates the state using a controlled approach..
WysiwygExtensionsSchema
You can define your own schema by following this interface.
Custom schema examples
Last updated