How to modify deltas before document is updated? #691
Replies: 1 comment 3 replies
-
From what you describe, you would be effectively using a ChangeNotifier to monitor keystroke changes and fire off events upon each keystroke, this could easily sends off dozens of events every second. Maybe you have a special use case and this is just my opinion: You really do not want to do this. WYSIWYG editor means "What You See is What You Get" to the end users, the editor should be the single source of truth, so leave the editor alone during the editing session, and only hands of the edited data back to your ChangeNotifier upon finish editing [your session before editor is active] -------(your CRDT sends current value to editor Once)--------> [editor session] ----------(your editor update your CRDT once upon finishing)----------> [your session] |
Beta Was this translation helpful? Give feedback.
-
Similar to this issue in QuillJS: slab/quill#2558, how can I modify the deltas that will be inserted into the Document, before it happens? Right now, I'm listening for changes from the controller
But I'd like to make a CRDT the source of truth for the document. So every delta would be inserted into the CRDT, and changes in the CRDT would be reflected in the Document. However currently, the Document is changed no matter what. Is there a way to overcome this? Something like a
disableUpdates
flag?Beta Was this translation helpful? Give feedback.
All reactions