* Removed the Kevin Roth rich text editor and replaced it with TinyMCE.
[citadel.git] / webcit / tiny_mce / plugins / fullscreen / editor_plugin_src.js
1 /* Import plugin specific language pack */
2 tinyMCE.importPluginLanguagePack('fullscreen', 'en,sv,cs,fr_ca,zh_cn');
3
4 function TinyMCE_fullscreen_getInfo() {
5         return {
6                 longname : 'Fullscreen',
7                 author : 'Moxiecode Systems',
8                 authorurl : 'http://tinymce.moxiecode.com',
9                 infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_fullscreen.html',
10                 version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
11         };
12 };
13
14 function TinyMCE_fullscreen_getControlHTML(control_name) {
15         switch (control_name) {
16                 case "fullscreen":
17                         return '<a href="javascript:tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceFullScreen\');" onmousedown="return false;"><img id="{$editor_id}_fullscreen" src="{$pluginurl}/images/fullscreen.gif" title="{$lang_fullscreen_desc}" width="20" height="20" class="mceButton' + (tinyMCE.getParam('fullscreen_is_enabled') ? 'Selected' : 'Normal') + '" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';
18         }
19
20         return "";
21 }
22
23 function TinyMCE_fullscreen_execCommand(editor_id, element, command, user_interface, value) {
24         // Handle commands
25         switch (command) {
26                 case "mceFullScreen":
27                         if (tinyMCE.getParam('fullscreen_is_enabled')) {
28                                 // In fullscreen mode
29                                 window.opener.tinyMCE.execInstanceCommand(tinyMCE.getParam('fullscreen_editor_id'), 'mceSetContent', false, tinyMCE.getContent(editor_id));
30                                 top.close();
31                         } else {
32                                 tinyMCE.setWindowArg('editor_id', editor_id);
33
34                                 var win = window.open(tinyMCE.baseURL + "/plugins/fullscreen/fullscreen.htm", "mceFullScreenPopup", "fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width=" + screen.availWidth + ",height="  + screen.availHeight);
35                         }
36         
37                         return true;
38         }
39
40         // Pass to next handler in chain
41         return false;
42 }
43
44