|
<html>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script language="javascript" type="text/javascript" src="../../tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
function patchCallback(settings, key) {
if (settings[key])
settings[key] = "window.opener." + settings[key];
}
var settings = new Array();
// Clone array
for (var name in window.opener.tinyMCE.settings)
settings[name] = window.opener.tinyMCE.settings[name];
// Override options for fullscreen
for (var name in window.opener.tinyMCE.settings.fullscreen_settings)
settings[name] = window.opener.tinyMCE.settings.fullscreen_settings[name];
// Patch callbacks, make them point to window.opener
patchCallback(settings, 'urlconverter_callback');
patchCallback(settings, 'insertlink_callback');
patchCallback(settings, 'insertimage_callback');
patchCallback(settings, 'setupcontent_callback');
patchCallback(settings, 'save_callback');
patchCallback(settings, 'onchange_callback');
patchCallback(settings, 'init_instance_callback');
patchCallback(settings, 'file_browser_callback');
patchCallback(settings, 'cleanup_callback');
patchCallback(settings, 'oninit');
// Set options
settings['mode'] = 'exact';
settings['elements'] = 'fullscreenarea';
settings['ask'] = false;
settings['setupcontent_callback'] = 'setupContent';
settings['fullscreen_is_enabled'] = true;
settings['fullscreen_editor_id'] = window.opener.tinyMCE.getWindowArg("editor_id");
settings['theme_advanced_resizing'] = false;
// Init
tinyMCE.init(settings);
tinyMCE.documentBasePath = window.opener.tinyMCE.documentBasePath;
function setupContent(editor_id, body, doc) {
var inst = tinyMCE.getInstanceById(editor_id);
var backInst = window.opener.tinyMCE.getInstanceById(tinyMCE.getParam('fullscreen_editor_id'));
// Setup title
var divElm = document.createElement("div");
divElm.innerHTML = tinyMCELang['lang_fullscreen_title'];
document.title = divElm.innerHTML;
// Get content
inst.getBody().innerHTML = backInst.getBody().innerHTML;
}
function unloadHandler(e) {
window.opener.tinyMCE.execInstanceCommand(tinyMCE.getParam('fullscreen_editor_id'), 'mceSetContent', false, tinyMCE.getContent("mce_editor_0"));
}
// Add onunload
tinyMCE.addEvent(window, "beforeunload", unloadHandler);
</script>
</head>
<body style="margin: 0px; overflow: hidden; height: 100%" scrolling="no" scroll="no">
<textarea id="fullscreenarea" style="width: 100%; height: 100%"></textarea>
</body>
</html>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.