upgrading tinymce to 2.0.5.1
This commit is contained in:
parent
cb2a8d025e
commit
00d46f6148
342 changed files with 13043 additions and 11487 deletions
|
|
@ -29,6 +29,7 @@
|
|||
patchCallback(settings, 'init_instance_callback');
|
||||
patchCallback(settings, 'file_browser_callback');
|
||||
patchCallback(settings, 'cleanup_callback');
|
||||
patchCallback(settings, 'execcommand_callback');
|
||||
patchCallback(settings, 'oninit');
|
||||
|
||||
// Set options
|
||||
|
|
@ -46,7 +47,7 @@
|
|||
|
||||
function setupContent(editor_id, body, doc) {
|
||||
var inst = tinyMCE.getInstanceById(editor_id);
|
||||
var backInst = window.opener.tinyMCE.getInstanceById(tinyMCE.getParam('fullscreen_editor_id'));
|
||||
var content = window.opener.tinyMCE.getContent(tinyMCE.getParam('fullscreen_editor_id'));
|
||||
|
||||
// Setup title
|
||||
var divElm = document.createElement("div");
|
||||
|
|
@ -54,20 +55,37 @@
|
|||
document.title = divElm.innerHTML;
|
||||
|
||||
// Get content
|
||||
inst.getBody().innerHTML = backInst.getBody().innerHTML;
|
||||
inst.execCommand('mceSetContent', false, content);
|
||||
}
|
||||
|
||||
function unloadHandler(e) {
|
||||
moveContent();
|
||||
}
|
||||
|
||||
function moveContent() {
|
||||
var doc = tinyMCE.isMSIE ? window.frames['mce_editor_0'].window.document : document.getElementById('mce_editor_0').contentDocument;
|
||||
window.opener.tinyMCE.setInnerHTML(window.opener.tinyMCE.selectedInstance.getBody(), doc.body.innerHTML);
|
||||
}
|
||||
|
||||
// Add onunload
|
||||
tinyMCE.addEvent(window, "beforeunload", unloadHandler);
|
||||
|
||||
function doParentSubmit() {
|
||||
moveContent();
|
||||
|
||||
if (window.opener.tinyMCE.selectedInstance.formElement.form)
|
||||
window.opener.tinyMCE.selectedInstance.formElement.form.submit();
|
||||
|
||||
window.close();
|
||||
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
<base target="_self" />
|
||||
</head>
|
||||
<body style="margin: 0px; overflow: hidden; height: 100%" scrolling="no" scroll="no">
|
||||
<body style="margin: 0; overflow: hidden; height: 100%" scrolling="no" scroll="no">
|
||||
<form onsubmit="doParentSubmit();" style="height: 100%">
|
||||
<textarea id="fullscreenarea" style="width: 100%; height: 100%"></textarea>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue