MCPcopy Create free account
hub / github.com/FormidableLabs/use-editable / insert

Method insert

src/useEditable.ts:166–166  ·  view source on GitHub ↗

Inserts new text at the caret position while deleting text in range of the offset (which accepts negative offsets).

(append: string, offset?: number)

Source from the content-addressed store, hash-verified

164 update(content: string): void;
165 /** Inserts new text at the caret position while deleting text in range of the offset (which accepts negative offsets). */
166 insert(append: string, offset?: number): void;
167 /** Positions the caret where specified */
168 move(pos: number | { row: number; column: number }): void;
169 /** Returns the current editor state, as usually received in onChange */

Callers 2

onKeyDownFunction · 0.80
onPasteFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected