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
I have a similar issue when using slate-yjs with y-indexeddb. Each time the slate editor is mounted, the contents are duplicated. The indexeddb updates table also seems to double in size each time the page is loaded. I'm not doing anything special here. Just passing along the y doc which holds my sharedType...
This is frontend code
useEffect(() => {
new IndexeddbPersistence(docName, provider.document)
}, [])
This is backend code
async onLoadDocument(data) {
if (data.document.isEmpty(data.documentName)) {
const insertDelta = slateNodesToInsertDelta(initialValue)
const sharedRoot = data.document.get(data.documentName, Y.XmlText) as unknown as Y.XmlText
sharedRoot.applyDelta(insertDelta)
}
return data.document
}
The text was updated successfully, but these errors were encountered:
Hi @BitPhinix
I have a similar issue when using slate-yjs with y-indexeddb. Each time the slate editor is mounted, the contents are duplicated. The indexeddb updates table also seems to double in size each time the page is loaded. I'm not doing anything special here. Just passing along the y doc which holds my sharedType...
This is frontend code
This is backend code
The text was updated successfully, but these errors were encountered: