Editorinterface. A handful of helpers are included in core for common richtext behaviors, but you are encouraged to write your own that model your specific domain.
formatQuotecommand, or an
insertImagecommand, or a
toggleBoldcommand depending on what types of content you allow.
🤖 The concept of commands is loosely based on the DOM's built-in
execCommandAPIs. However Slate defines its own simpler (and extendable!) version of the API, because the DOM's version is too opinionated and inconsistent.
Transformshelpers that ship with Slate.