Merge pull request #3335 from tractorcow/pulls/3.1/tinymce-self-cleanup

BUG Fix periodic tinymce layout refresh
This commit is contained in:
Mateusz U 2014-07-28 13:51:17 +12:00
commit 87f84039f9

View File

@ -92,7 +92,12 @@ ss.editorWrappers.tinyMCE = (function() {
var interval;
jQuery(ed.getBody()).on('focus', function() {
interval = setInterval(function() {
ed.save();
// Update underlying element as necessary
var element = jQuery(ed.getElement());
if(ed.isDirty()) {
// Set content without triggering editor content cleanup
element.val(ed.getContent({format : 'raw', no_events : 1}));
}
}, 5000);
});
jQuery(ed.getBody()).on('blur', function() {