1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
\r
2 <html xmlns="http://www.w3.org/1999/xhtml">
\r
5 <script type="text/javascript" src="../../tiny_mce.js"></script>
\r
6 <script type="text/javascript">
\r
7 function patchCallback(settings, key) {
\r
9 settings[key] = "window.opener." + settings[key];
\r
12 var settings = {}, paSe = window.opener.tinyMCE.activeEditor.settings, oeID = window.opener.tinyMCE.activeEditor.id;
\r
16 settings[n] = paSe[n];
\r
18 // Override options for fullscreen
\r
19 for (var n in paSe.fullscreen_settings)
\r
20 settings[n] = paSe.fullscreen_settings[n];
\r
22 // Patch callbacks, make them point to window.opener
\r
23 patchCallback(settings, 'urlconverter_callback');
\r
24 patchCallback(settings, 'insertlink_callback');
\r
25 patchCallback(settings, 'insertimage_callback');
\r
26 patchCallback(settings, 'setupcontent_callback');
\r
27 patchCallback(settings, 'save_callback');
\r
28 patchCallback(settings, 'onchange_callback');
\r
29 patchCallback(settings, 'init_instance_callback');
\r
30 patchCallback(settings, 'file_browser_callback');
\r
31 patchCallback(settings, 'cleanup_callback');
\r
32 patchCallback(settings, 'execcommand_callback');
\r
33 patchCallback(settings, 'oninit');
\r
37 settings['mode'] = 'exact';
\r
38 settings['elements'] = 'fullscreenarea';
\r
39 settings['add_unload_trigger'] = false;
\r
40 settings['ask'] = false;
\r
41 settings['document_base_url'] = window.opener.tinyMCE.activeEditor.documentBaseURI.getURI();
\r
42 settings['fullscreen_is_enabled'] = true;
\r
43 settings['fullscreen_editor_id'] = oeID;
\r
44 settings['theme_advanced_resizing'] = false;
\r
45 settings['strict_loading_mode'] = true;
\r
47 settings.save_onsavecallback = function() {
\r
48 window.opener.tinyMCE.get(oeID).setContent(tinyMCE.get('fullscreenarea').getContent({format : 'raw'}), {format : 'raw'});
\r
49 window.opener.tinyMCE.get(oeID).execCommand('mceSave');
\r
53 function unloadHandler(e) {
\r
57 function moveContent() {
\r
58 window.opener.tinyMCE.get(oeID).setContent(tinyMCE.activeEditor.getContent());
\r
61 function closeFullscreen() {
\r
66 function doParentSubmit() {
\r
69 if (window.opener.tinyMCE.selectedInstance.formElement.form)
\r
70 window.opener.tinyMCE.selectedInstance.formElement.form.submit();
\r
78 var e = document.getElementById('fullscreenarea'), vp, ed, ow, oh, dom = tinymce.DOM;
\r
80 e.value = window.opener.tinyMCE.get(oeID).getContent();
\r
82 vp = dom.getViewPort();
\r
83 settings.width = vp.w;
\r
84 settings.height = vp.h - 15;
\r
86 tinymce.dom.Event.add(window, 'resize', function() {
\r
87 var vp = dom.getViewPort();
\r
89 tinyMCE.activeEditor.theme.resizeTo(vp.w, vp.h);
\r
92 tinyMCE.init(settings);
\r
96 tinymce.dom.Event.add(window, "beforeunload", unloadHandler);
\r
99 <body style="margin:0;overflow:hidden;width:100%;height:100%" scrolling="no" scroll="no">
\r
100 <form onsubmit="doParentSubmit();">
\r
101 <textarea id="fullscreenarea" style="width:100%; height:100%"></textarea>
\r
104 <script type="text/javascript">
\r