MDL-61189 editor_tinymce: save data before submitting

This commit is contained in:
Simey Lameze
2018-05-23 10:48:27 +08:00
committed by Jake Dallimore
parent b345895a9d
commit 1bcc54ef25
+10
View File
@@ -80,6 +80,16 @@ M.editor_tinymce.init_editor = function(Y, editorid, options) {
});
};
}
// Retain any setup which is already defined.
options.originalSetupFunction = options.setup || function(){};
options.setup = function(editor) {
options.originalSetupFunction();
editor.onChange.add(function(ed) {
ed.save();
});
};
tinyMCE.init(options);
var item = document.getElementById(editorid+'_filemanager');