@mocanvas/mocanvas · interface

RichTextEditorMountOptions

interface RichTextEditorMountOptions

What mocanvas hands a rich-text editor when the user starts editing a label.


Methods · 2

onChange(value: RichTextNode & {

Called with the new document as the user types.

onFinish(): void

Called when the editor wants editing to stop (Escape, Enter on a single-line label).


Properties · 4

container: HTMLElement

The element the editor should mount into.

extensions: readonly RichTextExtension[]

The extension list configured on the editor.

initialValue: RichTextNode & {

The document to start from.

singleLine: boolean

Whether typing should be constrained to one line (a frame's name).

mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.