persist document to database after 2 seconds of no updates, initialize with current state when joining genserver
This commit is contained in:
@@ -28,6 +28,11 @@ export let TextEditor = {
|
||||
range && this.quill.setSelection(range.index, range.length);
|
||||
})
|
||||
|
||||
channel.on("saved", () => {
|
||||
console.log('Saved');
|
||||
// TODO: Show a saved message
|
||||
})
|
||||
|
||||
this.quill.on('text-change', (delta, oldDelta, source) => {
|
||||
if (delta == oldDelta) return;
|
||||
if (source == 'api') {
|
||||
|
Reference in New Issue
Block a user