includes/clientside/tinymce/plugins/fullscreen/fullscreen.htm
changeset 459 31c23016ab62
parent 395 fa4c5ecb7c9a
child 476 f26a69c40431
equal deleted inserted replaced
458:c433348f3628 459:31c23016ab62
    41 		settings['ask'] = false;
    41 		settings['ask'] = false;
    42 		settings['document_base_url'] = window.opener.tinyMCE.activeEditor.documentBaseURI.getURI();
    42 		settings['document_base_url'] = window.opener.tinyMCE.activeEditor.documentBaseURI.getURI();
    43 		settings['fullscreen_is_enabled'] = true;
    43 		settings['fullscreen_is_enabled'] = true;
    44 		settings['fullscreen_editor_id'] = window.opener.tinyMCE.activeEditor.id;
    44 		settings['fullscreen_editor_id'] = window.opener.tinyMCE.activeEditor.id;
    45 		settings['theme_advanced_resizing'] = false;
    45 		settings['theme_advanced_resizing'] = false;
       
    46 		settings['strict_loading_mode'] = true;
       
    47 
       
    48 		settings.save_onsavecallback = function() {
       
    49 			window.opener.tinyMCE.activeEditor.setContent(tinyMCE.get('fullscreenarea').getContent({format : 'raw'}), {format : 'raw'});
       
    50 			window.opener.tinyMCE.activeEditor.execCommand('mceSave');
       
    51 			window.close();
       
    52 		};
    46 
    53 
    47 		function unloadHandler(e) {
    54 		function unloadHandler(e) {
    48 			moveContent();
    55 			moveContent();
    49 		}
    56 		}
    50 
    57 
    51 		function moveContent() {
    58 		function moveContent() {
    52 			window.opener.tinyMCE.activeEditor.setContent(tinyMCE.activeEditor.getContent({format : 'raw'}));
    59 			window.opener.tinyMCE.activeEditor.setContent(tinyMCE.activeEditor.getContent());
    53 		}
    60 		}
    54 
    61 
    55 		function closeFullscreen() {
    62 		function closeFullscreen() {
    56 			moveContent();
    63 			moveContent();
    57 			window.close();
    64 			window.close();
    78 <textarea id="fullscreenarea" style="width:100%; height:100%"></textarea>
    85 <textarea id="fullscreenarea" style="width:100%; height:100%"></textarea>
    79 </form>
    86 </form>
    80 
    87 
    81 <script type="text/javascript">
    88 <script type="text/javascript">
    82 		var e = document.getElementById('fullscreenarea');
    89 		var e = document.getElementById('fullscreenarea');
    83 		e.value = window.opener.tinyMCE.activeEditor.getContent({format : 'raw'});
    90 		e.value = window.opener.tinyMCE.activeEditor.getContent();
    84 		settings['width'] = window.innerWidth || document.body.clientWidth;
    91 		settings.width = window.innerWidth || document.body.clientWidth;
    85 		settings['height'] = (window.innerHeight || document.body.clientHeight) - 18;
    92 		settings.height = (window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight) - 18;
    86 		tinyMCE.init(settings);
    93 		tinyMCE.init(settings);
    87 </script>
    94 </script>
    88 
    95 
    89 </body>
    96 </body>
    90 </html>
    97 </html>