includes/clientside/tinymce/plugins/fullscreen/editor_plugin_src.js
changeset 459 31c23016ab62
parent 395 fa4c5ecb7c9a
child 476 f26a69c40431
equal deleted inserted replaced
458:c433348f3628 459:31c23016ab62
     1 /**
     1 /**
     2  * $Id: editor_plugin_src.js 544 2008-01-17 13:07:00Z spocke $
     2  * $Id: editor_plugin_src.js 609 2008-02-18 16:19:27Z spocke $
     3  *
     3  *
     4  * @author Moxiecode
     4  * @author Moxiecode
     5  * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
     5  * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
     6  */
     6  */
     7 
     7 
    79 					s.width = n.clientWidth;
    79 					s.width = n.clientWidth;
    80 					s.height = n.clientHeight - 15;
    80 					s.height = n.clientHeight - 15;
    81 					s.fullscreen_is_enabled = true;
    81 					s.fullscreen_is_enabled = true;
    82 					s.fullscreen_editor_id = ed.id;
    82 					s.fullscreen_editor_id = ed.id;
    83 					s.theme_advanced_resizing = false;
    83 					s.theme_advanced_resizing = false;
       
    84 					s.save_onsavecallback = function() {
       
    85 						ed.setContent(tinyMCE.get(s.id).getContent({format : 'raw'}), {format : 'raw'});
       
    86 						ed.execCommand('mceSave');
       
    87 					};
    84 
    88 
    85 					tinymce.each(ed.getParam('fullscreen_settings'), function(v, k) {
    89 					tinymce.each(ed.getParam('fullscreen_settings'), function(v, k) {
    86 						s[k] = v;
    90 						s[k] = v;
    87 					});
    91 					});
    88 
    92 
    89 					if (s.theme_advanced_toolbar_location === 'external')
    93 					if (s.theme_advanced_toolbar_location === 'external')
    90 						s.theme_advanced_toolbar_location = 'top';
    94 						s.theme_advanced_toolbar_location = 'top';
    91 
    95 
    92 					t.fullscreenEditor = new tinymce.Editor('mce_fullscreen', s);
    96 					t.fullscreenEditor = new tinymce.Editor('mce_fullscreen', s);
    93 					t.fullscreenEditor.onInit.add(function() {
    97 					t.fullscreenEditor.onInit.add(function() {
    94 						t.fullscreenEditor.setContent(ed.getContent({format : 'raw', no_events : 1}), {format : 'raw', no_events : 1});
    98 						t.fullscreenEditor.setContent(ed.getContent());
    95 					});
    99 					});
    96 
   100 
    97 					t.fullscreenEditor.render();
   101 					t.fullscreenEditor.render();
    98 					tinyMCE.add(t.fullscreenEditor);
   102 					tinyMCE.add(t.fullscreenEditor);
    99 
   103