do not store copy of data

This commit is contained in:
ammarahm-ed
2021-02-26 10:15:59 +05:00
parent f49963dc38
commit c4c2581d6f
2 changed files with 2 additions and 5 deletions

View File

@@ -111,11 +111,9 @@ function init_tiny(size) {
}, },
}); });
} }
window.prevContent = ''; window.prevContent = "";
const onChange = (event) => { const onChange = (event) => {
if (event.type === 'nodechange' && !event.selectionChange) return; if (event.type === 'nodechange' && !event.selectionChange) return;
if (editor.getContent() === window.prevContent) return;
window.prevContent = editor.getContent();
if (isLoading) { if (isLoading) {
isLoading = false; isLoading = false;

View File

@@ -114,8 +114,7 @@ function init_tiny(size) {
window.prevContent = ""; window.prevContent = "";
const onChange = (event) => { const onChange = (event) => {
if (event.type === "nodechange" && !event.selectionChange) return; if (event.type === "nodechange" && !event.selectionChange) return;
if (editor.getContent() === window.prevContent) return;
window.prevContent = editor.getContent();
if (isLoading) { if (isLoading) {
isLoading = false; isLoading = false;