useEditableRichText

See source code
function useEditableRichText(
  shapeId: TLShapeId,
  type: string,
  richText?: TLRichText
): {
  handleBlur: () => void
  handleChange: ({ richText }: { richText: TLRichText }) => void
  handleDoubleClick: (e: any) => any
  handleFocus: () => void
  handleInputPointerDown: (e: import('react').PointerEvent<Element>) => void
  handleKeyDown: (e: KeyboardEvent) => void
  isEditing: boolean
  isEditingAnything: boolean
  isEmpty: boolean
  rInput: import('react').RefObject<HTMLDivElement>
}

Parameters

NameDescription

shapeId

type

string

richText

Returns

{
  handleBlur: () => void
  handleChange: ({ richText }: { richText: TLRichText }) => void
  handleDoubleClick: (e: any) => any
  handleFocus: () => void
  handleInputPointerDown: (e: import('react').PointerEvent<Element>) => void
  handleKeyDown: (e: KeyboardEvent) => void
  isEditing: boolean
  isEditingAnything: boolean
  isEmpty: boolean
  rInput: import('react').RefObject<HTMLDivElement>
}
Prev
useEditablePlainText
Next
useExportAs