Bug fix for open/8181 which stops the HTML source editor window saving/publishing

This commit is contained in:
Kirk Mayo 2013-01-21 13:03:14 +13:00 committed by Ingo Schommer
parent e1517044cf
commit d12ae82f70

View File

@ -1319,5 +1319,16 @@ function sapphiremce_cleanup(type, value) {
}); });
} }
// if we are inserting from a popup back into the editor
// add the changed class and update the Content value
if(type == 'insert_to_editor') {
var field = jQuery('#' + tinyMCE.selectedInstance.editorId);
var original = field.val();
if (original != value) {
field.val(value).addClass('changed');
field.closest('form').addClass('changed');
}
}
return value; return value;
} }