[ Index ] |
|
Code source de Seagull 0.6.1 |
1 /** 2 * $RCSfile: editor_plugin_src.js,v $ 3 * $Revision: 1.16 $ 4 * $Date: 2006/03/14 17:33:39 $ 5 * 6 * @author Moxiecode 7 * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved. 8 */ 9 10 /* Import plugin specific language pack */ 11 tinyMCE.importPluginLanguagePack('fullscreen', 'en,tr,sv,cs,fr_ca,zh_cn,da,he,nb,de,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,pl,nl,fr,pt_br'); 12 13 var TinyMCE_FullScreenPlugin = { 14 getInfo : function() { 15 return { 16 longname : 'Fullscreen', 17 author : 'Moxiecode Systems', 18 authorurl : 'http://tinymce.moxiecode.com', 19 infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_fullscreen.html', 20 version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion 21 }; 22 }, 23 24 getControlHTML : function(cn) { 25 switch (cn) { 26 case "fullscreen": 27 return tinyMCE.getButtonHTML(cn, 'lang_fullscreen_desc', '{$pluginurl}/images/fullscreen.gif', 'mceFullScreen'); 28 } 29 30 return ""; 31 }, 32 33 execCommand : function(editor_id, element, command, user_interface, value) { 34 // Handle commands 35 switch (command) { 36 case "mceFullScreen": 37 if (tinyMCE.getParam('fullscreen_is_enabled')) { 38 // In fullscreen mode 39 window.opener.tinyMCE.execInstanceCommand(tinyMCE.getParam('fullscreen_editor_id'), 'mceSetContent', false, tinyMCE.getContent(editor_id)); 40 top.close(); 41 } else { 42 tinyMCE.setWindowArg('editor_id', editor_id); 43 44 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); 45 try { win.resizeTo(screen.availWidth, screen.availHeight); } catch (e) {} 46 } 47 48 return true; 49 } 50 51 // Pass to next handler in chain 52 return false; 53 }, 54 55 handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) { 56 if (tinyMCE.getParam('fullscreen_is_enabled')) 57 tinyMCE.switchClass(editor_id + '_fullscreen', 'mceButtonSelected'); 58 59 return true; 60 } 61 }; 62 63 tinyMCE.addPlugin("fullscreen", TinyMCE_FullScreenPlugin);
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Fri Mar 30 01:27:52 2007 | par Balluche grâce à PHPXref 0.7 |