startEditingShapeWithRichText

See source code

Start editing a shape that has rich text, such as text, note, geo, or arrow shapes. This will enter the editing state for the shape and optionally select all the text.

function startEditingShapeWithRichText(
  editor: Editor,
  shape: TLShape,
  selectAll?: boolean
): void

Parameters

NameDescription

editor

Editor

The editor instance.

shape

The shape to start editing. This shape must have a richText property with a TLRichText value.

selectAll

boolean

Whether to select all the text in the shape once editing begins.

Returns

void
Prev
serializeTldrawJsonBlob
Next
truncateStringWithEllipsis