updated tinymce to 3.5.11

This commit is contained in:
hauke 2014-09-07 12:51:05 +02:00
parent a162ea7251
commit 386eadde3a
24 changed files with 1050 additions and 336 deletions

View file

@ -46,7 +46,7 @@
settings['strict_loading_mode'] = true;
settings.save_onsavecallback = function() {
window.opener.tinyMCE.get(oeID).setContent(tinyMCE.get('fullscreenarea').getContent({format : 'raw'}), {format : 'raw'});
moveContent();
window.opener.tinyMCE.get(oeID).execCommand('mceSave');
window.close();
};
@ -56,11 +56,15 @@
}
function moveContent() {
window.opener.tinyMCE.get(oeID).setContent(tinyMCE.activeEditor.getContent());
// find the original editor, execute restore state in it's plugin instance
window.opener.tinyMCE.get(oeID).plugins.fullscreen.saveState(tinyMCE.activeEditor);
// prevent moveContent from being called twice - e.g. if the unloadHandler runs after moveContent()
tinymce.dom.Event.remove(window, "beforeunload", unloadHandler);
}
function closeFullscreen() {
moveContent();
// moveContent() will be called by the unload handler
window.close();
}
@ -78,17 +82,20 @@
function render() {
var e = document.getElementById('fullscreenarea'), vp, ed, ow, oh, dom = tinymce.DOM;
e.value = window.opener.tinyMCE.get(oeID).getContent();
vp = dom.getViewPort();
settings.width = vp.w;
settings.height = vp.h - 15;
tinymce.dom.Event.add(window, 'resize', function() {
var vp = dom.getViewPort();
settings.oninit = function() {
var ed = tinyMCE.activeEditor;
window.opener.tinyMCE.get(oeID).plugins.fullscreen.loadState(ed);
tinyMCE.activeEditor.theme.resizeTo(vp.w, vp.h);
});
tinymce.dom.Event.add(window, 'resize', function() {
var vp = dom.getViewPort();
tinyMCE.activeEditor.theme.resizeTo(vp.w, vp.h);
});
}
tinyMCE.init(settings);
}