TLOnMountHandler

See source code

Called when the editor has mounted.

type TLOnMountHandler = (
  editor: Editor,
) => (() => undefined | void) | undefined | void;

Example

<Tldraw onMount={(editor) => editor.selectAll()} />

Parameters

NameDescription

editor

The editor instance.

Prev
TLMeasuredTextSize
Next
TLPinchEvent