@mocanvas/mocanvas · function

unwrapLabel

declare function unwrapLabel(label: unknown, max?: number): string

The plain text of a label that may carry markup.

Menus show a shape's label as a row title; a shape whose label is a rich-text document would otherwise render as [object Object].

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.