--- /dev/null
+/**\r
+ * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $\r
+ *\r
+ * @author Moxiecode\r
+ * @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.\r
+ */\r
+\r
+var TinyMCE_ZoomPlugin = {\r
+ getInfo : function() {\r
+ return {\r
+ longname : 'Zoom',\r
+ author : 'Moxiecode Systems AB',\r
+ authorurl : 'http://tinymce.moxiecode.com',\r
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/zoom',\r
+ version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion\r
+ };\r
+ },\r
+\r
+ /**\r
+ * Returns the HTML contents of the zoom control.\r
+ */\r
+ getControlHTML : function(control_name) {\r
+ if (!tinyMCE.isMSIE || tinyMCE.isMSIE5_0 || tinyMCE.isOpera)\r
+ return "";\r
+\r
+ switch (control_name) {\r
+ case "zoom":\r
+ 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">' + \r
+ '<option value="100%">+ 100%</option>' + \r
+ '<option value="150%">+ 150%</option>' + \r
+ '<option value="200%">+ 200%</option>' + \r
+ '<option value="250%">+ 250%</option>' + \r
+ '</select>';\r
+ }\r
+\r
+ return "";\r
+ },\r
+\r
+ /**\r
+ * Executes the mceZoom command.\r
+ */\r
+ execCommand : function(editor_id, element, command, user_interface, value) {\r
+ // Handle commands\r
+ switch (command) {\r
+ case "mceZoom":\r
+ tinyMCE.getInstanceById(editor_id).contentDocument.body.style.zoom = value;\r
+ tinyMCE.getInstanceById(editor_id).contentDocument.body.style.mozZoom = value;\r
+ return true;\r
+ }\r
+\r
+ // Pass to next handler in chain\r
+ return false;\r
+ }\r
+};\r
+\r
+tinyMCE.addPlugin("zoom", TinyMCE_ZoomPlugin);\r