2 * $Id: editor_plugin_src.js 126 2006-10-22 16:19:55Z spocke $
\r
5 * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
\r
8 var TinyMCE_ZoomPlugin = {
\r
9 getInfo : function() {
\r
12 author : 'Moxiecode Systems AB',
\r
13 authorurl : 'http://tinymce.moxiecode.com',
\r
14 infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_zoom.html',
\r
15 version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
\r
20 * Returns the HTML contents of the zoom control.
\r
22 getControlHTML : function(control_name) {
\r
23 if (!tinyMCE.isMSIE || tinyMCE.isMSIE5_0 || tinyMCE.isOpera)
\r
26 switch (control_name) {
\r
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">' +
\r
29 '<option value="100%">+ 100%</option>' +
\r
30 '<option value="150%">+ 150%</option>' +
\r
31 '<option value="200%">+ 200%</option>' +
\r
32 '<option value="250%">+ 250%</option>' +
\r
40 * Executes the mceZoom command.
\r
42 execCommand : function(editor_id, element, command, user_interface, value) {
\r
46 tinyMCE.getInstanceById(editor_id).contentDocument.body.style.zoom = value;
\r
47 tinyMCE.getInstanceById(editor_id).contentDocument.body.style.mozZoom = value;
\r
51 // Pass to next handler in chain
\r
56 tinyMCE.addPlugin("zoom", TinyMCE_ZoomPlugin);
\r