@mocanvas/editor · interface

TLContent

interface TLContent

A copied selection, whole enough to be pasted into a different document.

schema travels with it because a selection copied from an older build has to be migrated before it can be inserted — without it, pasting between two versions of an app silently produces shapes with missing props.


Properties · 5

assets?: Asset[] | undefined

Assets the shapes reference, so an image survives a paste into an empty document.

bindings?: UnknownBinding[] | undefined

Bindings whose two ends are both inside shapes.

rootShapeIds?: ShapeId[] | undefined

Which of shapes were top level in the selection, for re-parenting on paste.

schema?: SerializedSchema | undefined

The schema the shapes were serialized against.

shapes: UnknownShape[]

The shapes, in reading order, including descendants of the selection.

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.