Slate Component
The
Slate
component must include somewhere in its children
the Editable
component.type SlateProps = {
editor: ReactEditor
value: Descendant[]
children: React.ReactNode
onChange?: (value: Descendant[]) => void
}
An instance of
ReactEditor
The initial value of the Editor.
This prop is deceptively named.
Slate once was a controlled component (i.e. it's contents were strictly controlled by the
value
prop) but due to features like its edit history which would be corrupted by direct editing of the value
it is no longer a controlled component.The
children
which must contain an Editable
component.An optional callback function which you can use to be notified of changes in the editor's value.
Last modified 1mo ago