Skip to content

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.

new MarkputHandle(host, tokens): MarkputHandle;

Defined in: core/src/store/MarkputHandle.ts:19

Parameter Type
host Host
tokens TokenModel

MarkputHandle

get container(): HTMLElement | null;

Defined in: core/src/store/MarkputHandle.ts:24

HTMLElement | null

focus(): void;

Defined in: core/src/store/MarkputHandle.ts:28

void