Document dirty indicator
Question
I'd like to indicate that the document is not saved. What would be the best way to know if the document data has changed from the last load/save?
Thanks!
Answers (3)
Perfect! Thank you so much for the quick reply ... and also this project. Very nice!
There is an internal counter which you can use like this
editor.on('change:changesCount', () => {
const editorModel = editor.getModel();
const changes = editorModel.get('changesCount');
if (changes) {
// dirty
}
});
// same as
editor.on('change:changesCount', (editorModel, changes) => { ... });
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #720
Document Dirty Indicator
I want to display document dirty indicator unless document is saved to database. I have custom button on editor to save html to db I tried...
Issue #1158
[Question] Is there some way to know last time was stored?
I'm using autosave option in storeManager and I would like to know if is there some way to get last time content was stored
Issue #682
Creating BLOCKs with settings like Style Manager
Hello! I would like to know if you can create BLOCKs with options such like style manager, i. e. not drag, showing options in the same side...
Issue #957
[Question] Add custom attributes (data-) to assets/images on Upload/Selection
Hi, I am trying my best to find the proper/best way to do this, but I need to attach two custom HTML5 data tags to an image once it is sele...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.