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
here is my code to reset data, it will replace the old data:
constresetData=async(id:string)=>{try{awaiteditor.isReady;console.log('Editor.js is ready to work!')constdata=awaitgetNoteById(id)if(data){if(data?.editorBlocks){consteditorData={blocks: data?.editorBlocks,version: data?.editorVersion,time: data?.editorTime}asOutputData;awaiteditor.render(editorData)}else{// removes all Blocks and creates new empty initial type Blockeditor.clear()}}}catch(reason){console.log(`Editor.js initialization failed because of ${reason}`)}}
if the editor contain the table block, it will trigger change event when I call the resetData method. It will save the wrong data.
The text was updated successfully, but these errors were encountered:
here is my code to reset data, it will replace the old data:
if the editor contain the table block, it will trigger change event when I call the resetData method. It will save the wrong data.
The text was updated successfully, but these errors were encountered: