@mocanvas/editor · function
declare function canEditShape(editor: Editor, shape: ShapeRef, info?: TLEditStartInfo): booleanWhether a shape can be put into its editing state right now.
info says what is trying to start the edit — a double click, the enter key,
a click on a header — so a util can allow some routes and not others; a shape
whose label is only editable from its header is the usual case.
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.