diff --git a/lib/editor/tinymce/module.js b/lib/editor/tinymce/module.js index d3118ef0f33..b7b790472a6 100644 --- a/lib/editor/tinymce/module.js +++ b/lib/editor/tinymce/module.js @@ -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');