Code

API

This component extends the native <div>arrow-up-right API. That's why the className prop is not included in the table.

Props
Type
Required

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;

❌

chevron-rightvarianthashtag

Used to set a different width, wether the default width or the 100% of the parent container.

chevron-rightlayouthashtag

The way the toolbar behaves. If 'wrap' then elements are wrapped, if not an automatic overflow is shown.

chevron-rightcenteredToolbarhashtag

Used to render a centered toolbar.

circle-exclamation
chevron-rightdefaultContent and contenthashtag

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..

chevron-rightmacroshashtag

A string array passed to render predefined strings.

chevron-rightonChangehashtag

Function executed everytime the content in the editor changes.

chevron-rightschemahashtag

The schema is a prop used to personalize the way you want to render your Wysiwyg,

WysiwygExtensionsSchema

You can define your own schema by following this interface.

Custom schema examples

Last updated