Skip to content

Commit 3f6b90d

Browse files
authored
fix(super-editor): correct selection slice JSDoc insert example (SD-2921) (#3086)
The doc-API insert input takes value + type, not content. The example in SelectionSlice.selectionTarget JSDoc was stale and produced a type error if anyone copy-pasted it from IDE hover.
1 parent 9b0b4a1 commit 3f6b90d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/super-editor/src/ui/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ export interface SelectionSlice {
259259
* ```ts
260260
* const { selectionTarget } = ui.selection.getSnapshot();
261261
* if (selectionTarget) {
262-
* editor.doc.insert({ target: selectionTarget, content: 'Hello' });
262+
* editor.doc.insert({ target: selectionTarget, value: 'Hello', type: 'text' });
263263
* }
264264
* ```
265265
*

0 commit comments

Comments
 (0)