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,
  shapeOrId: TLShape | TLShapeId,
  options?: {
    info?: TLEventInfo
    selectAll?: boolean
  }
): void

Parameters

NameDescription

editor

Editor

The editor instance.

shapeOrId

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

options

{
  info?: TLEventInfo
  selectAll?: boolean
}

Options: selectAll or info (TLEventInfo)

Returns

void
Prev
setStrokePointRadii
Next
truncateStringWithEllipsis