Element the overlay is appended to. Must be position: relative/absolute.
OptionalgetOptional: read the current rich-text runs for id. When provided AND
returns a non-empty array, the overlay renders the runs as styled
<span data-run> elements; otherwise the overlay is seeded with plain
text via getText.
Read screen-space pose for id. Called per frame while editing.
Read style for id (used for font setup on the overlay).
Read the current text for id.
OptionalisIs el part of the editor's own chrome — a character-options bar, a
color popover, anything whose whole purpose is to style the text being
edited? Focus moving into one does not end the edit.
Without this, the controls the feature exists for are exactly what
destroys it: clicking a size field blurs the overlay, blur commits, and
the caret the control was about to act on is gone. Toggle buttons can
dodge it by preventDefault()-ing their own mousedown, but a field the
user has to type into cannot.
Chrome focus does not disturb the reported selection either — see
UseTextEditReturn.selection.
OptionalsetOptional: commit rich-text runs back to the node. When omitted, only
setText is called with the plain-text form on commit. When provided,
commit calls both setText (with runsToPlainText(runs)) and
setRuns(id, runs) — but only when runs are actually in play: the node
already had some, or the edit produced styling. A plain-text edit of a
plain-text node still calls setText alone, so a node that has never
been styled doesn't grow a single-run runs array just for being edited.
Commit text. Caller wraps in op/undo.
Options for
useTextEdit.