useEditablePlainText

See source code
function useEditablePlainText(
  shapeId: TLShapeId,
  type: string,
  text?: string
): {
  handleBlur: () => void
  handleChange: ({ plaintext }: { plaintext: string }) => void
  handleDoubleClick: (e: any) => any
  handleFocus: () => void
  handleInputPointerDown: (e: React.PointerEvent<Element>) => void
  handleKeyDown: (e: KeyboardEvent) => void
  isEditing: boolean
  isEditingAnything: boolean
  isEmpty: boolean
  rInput: React.RefObject<HTMLTextAreaElement>
}

Parameters

NameDescription

shapeId

type

string

text

string

Returns

{
  handleBlur: () => void
  handleChange: ({ plaintext }: { plaintext: string }) => void
  handleDoubleClick: (e: any) => any
  handleFocus: () => void
  handleInputPointerDown: (e: React.PointerEvent<Element>) => void
  handleKeyDown: (e: KeyboardEvent) => void
  isEditing: boolean
  isEditingAnything: boolean
  isEmpty: boolean
  rInput: React.RefObject<HTMLTextAreaElement>
}
Prev
useDialogs
Next
useEditableRichText