You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8a19fee
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/concepts/05-operations.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,4 +35,10 @@ editor.update(tx => {
35
35
36
36
Under the covers Slate converts editor method calls into low-level operations and applies them automatically. You usually think about operations only when implementing collaborative editing, history, or import/export tooling.
37
37
38
+
Bulk edits can still be one operation. For example, paste can produce a
39
+
`replace_fragment` operation that replaces a child slice and moves the model
40
+
selection to the end of the inserted fragment. Collaboration adapters can replay
41
+
that operation directly, or translate it into their own CRDT representation at
42
+
the adapter boundary.
43
+
38
44
> 🤖 Slate's editing behaviors being defined as operations is what makes things like collaborative editing possible, because each change is easily define-able, apply-able, compose-able and even undo-able!
Normal apps should pass `decorationSources` and `annotationStores` to `Slate`, then render projected text through `renderSegment`.
140
+
Normal apps should pass `decorationSources` and `annotationStore` to `Slate`, then render projected text through `renderSegment`.
141
141
142
142
## `placeholder` And `renderPlaceholder`
143
143
@@ -181,11 +181,11 @@ Use `onDOMBeforeInput` only when you need the native `InputEvent`. Keep model wr
181
181
182
182
## Projection Sources
183
183
184
-
Put decoration sources and annotation stores on `Slate`, not `Editable`. The provider owns editor-level projection sources so the editor surface, toolbar, and overlay UI read the same committed projection.
184
+
Put decoration sources and the annotation store on `Slate`, not `Editable`. The provider owns editor-level projection sources so the editor surface, toolbar, and overlay UI read the same committed projection.
0 commit comments