MarkputHandle
Defined in: core/src/store/MarkputHandle.ts:18
What a consumer holds through the ref prop: React’s useImperativeHandle target
(react/.../MarkedInput.tsx) and Vue’s defineExpose argument (vue/.../MarkedInput.vue).
TWO MEMBERS, deliberately. The v2 surface added twelve more — value, nodes, find,
changed, insertMark, replaceText, replaceRange, setValue, tx, selection,
select, caret — and they are withdrawn: the editor is driven by its props, so a write
belongs in the value a parent already owns, not in a second imperative path that has to
agree with it. What is left is what props cannot express: the host element, and moving the
caret into it.
It owns nothing. Both members lower onto a state owner — the host for the element, the token layer for the caret — so the shape of the handle can move without moving state.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new MarkputHandle(host, tokens): MarkputHandle;Defined in: core/src/store/MarkputHandle.ts:19
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
host |
Host |
tokens |
TokenModel |
Returns
Section titled “Returns”MarkputHandle
Accessors
Section titled “Accessors”container
Section titled “container”Get Signature
Section titled “Get Signature”get container(): HTMLElement | null;Defined in: core/src/store/MarkputHandle.ts:24
Returns
Section titled “Returns”HTMLElement | null
Methods
Section titled “Methods”focus()
Section titled “focus()”focus(): void;Defined in: core/src/store/MarkputHandle.ts:28
Returns
Section titled “Returns”void