MDL-77897 editor_tiny: Save editor content on editor blur

This commit is contained in:
Andrew Nicols 2023-04-19 14:57:10 +08:00
parent 7beda01cae
commit 489a53ceb2
3 changed files with 7 additions and 2 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -447,6 +447,11 @@ export const setupForTarget = async(target, options = {}) => {
});
}
// Save the editor content to the textarea when the editor is blurred.
editor.on('blur', () => {
editor.save();
});
pendingPromise.resolve();
return editor;
};