mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Changed autosave handling for better editor performance
This changes how the editors interact with the parent page-editor compontent, which handles auto-saving. Instead of blasting the full editor content upon any change to that parent compontent, the editors just alert of a change, without the content. The parent compontent then requests the editor content from the editor component when it needs that data for an autosave. For #3981
This commit is contained in:
@ -185,11 +185,10 @@ function getSetupCallback(options) {
|
||||
});
|
||||
|
||||
function editorChange() {
|
||||
const content = editor.getContent();
|
||||
if (options.darkMode) {
|
||||
editor.contentDocument.documentElement.classList.add('dark-mode');
|
||||
}
|
||||
window.$events.emit('editor-html-change', content);
|
||||
window.$events.emit('editor-html-change', '');
|
||||
}
|
||||
|
||||
// Custom handler hook
|
||||
|
Reference in New Issue
Block a user