Save issue - saves fine, but won't allow a second "save"
See original GitHub issueHi - thanks for the great library! When I listen to the “saved” event, it triggers successfully, but it seems the tools stop listening. (I can no longer hilight and edit). If I trigger save a second time, I get
Uncaught TypeError: Cannot read property 'removeAttribute' of null
at c.unmount (contentTools.js:110)
at c.save (contentTools.js:113)
at HTMLElement.sb.onclick (contentTools.js:946)
c.unmount @ contentTools.js:110
c.save @ contentTools.js:113
sb.onclick @ contentTools.js:946
Even if I just return without doing anything this happens. For example:
editor.addEventListener('saved', async function (ev) {
var name, payload, regions, xhr, template;
return true;
});
Is the API expecting a return code or some sort of trigger to indicate success and return to an editable state?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
You may receive a "Your changes could not be saved" error ...
This issue occurs if Excel cannot delete the original file or cannot rename the temporary file so that the save operation cannot successfully...
Read more >Why am I unable to save a file on my computer?
It can be frustrating when you're using a computer program and can't save a file you're creating or modifying.
Read more >Troubleshoot issues with saving files - Adobe Support
Experiencing issues while saving a file in Illustrator? Here are some troubleshooting steps that you can try.
Read more >"One or more objects in this drawing cannot be saved to the ...
Issue : When trying to save a drawing in AutoCAD, the following message is displayed: AutoCAD Message. One or more objects in this...
Read more >How to Fix Documents Not Saving on macOS 10.15
If you can't save a document using Word for Mac OS 10.15 due to an error message that states that “the document cannot...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
YES! Thank you! that was a super easy fix!
Ah OK so you have a custom save button - no worries but this explains why the editors state is getting out of wack.
So if your save button is passive (as in you want the button to save the document but not exit the editing mode) then when you call save flag that you want this to be a passive save
save(true)
.However, if you want the save button to save the changes and exit edit mode then you need to stop the editor, something like:
Let me know if that helps out.