@mocanvas/mocanvas · type

TLOnMountHandler

type TLOnMountHandler = (editor: Editor) => void | (() => void)

What onMount is: called once with the editor as soon as it exists, and on nothing else. Return a function to run when the editor is torn down — the place to undo whatever the handler wired up.

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.