[ Index ] |
|
Code source de e107 0.7.8 |
1 /** 2 * $Id: editor_plugin_src.js,v 1.2 2006/10/27 22:36:57 e107coders Exp $ 3 * 4 * @author Moxiecode 5 * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved. 6 */ 7 8 var TinyMCE_ZoomPlugin = { 9 getInfo : function() { 10 return { 11 longname : 'Zoom', 12 author : 'Moxiecode Systems AB', 13 authorurl : 'http://tinymce.moxiecode.com', 14 infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_zoom.html', 15 version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion 16 }; 17 }, 18 19 /** 20 * Returns the HTML contents of the zoom control. 21 */ 22 getControlHTML : function(control_name) { 23 if (!tinyMCE.isMSIE || tinyMCE.isMSIE5_0 || tinyMCE.isOpera) 24 return ""; 25 26 switch (control_name) { 27 case "zoom": 28 return '<select id="{$editor_id}_zoomSelect" name="{$editor_id}_zoomSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceZoom\',false,this.options[this.selectedIndex].value);" class="mceSelectList">' + 29 '<option value="100%">+ 100%</option>' + 30 '<option value="150%">+ 150%</option>' + 31 '<option value="200%">+ 200%</option>' + 32 '<option value="250%">+ 250%</option>' + 33 '</select>'; 34 } 35 36 return ""; 37 }, 38 39 /** 40 * Executes the mceZoom command. 41 */ 42 execCommand : function(editor_id, element, command, user_interface, value) { 43 // Handle commands 44 switch (command) { 45 case "mceZoom": 46 tinyMCE.getInstanceById(editor_id).contentDocument.body.style.zoom = value; 47 tinyMCE.getInstanceById(editor_id).contentDocument.body.style.mozZoom = value; 48 return true; 49 } 50 51 // Pass to next handler in chain 52 return false; 53 } 54 }; 55 56 tinyMCE.addPlugin("zoom", TinyMCE_ZoomPlugin);
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Apr 1 01:23:32 2007 | par Balluche grâce à PHPXref 0.7 |