Ticket #5703: wphelp.patch
File wphelp.patch, 12.6 KB (added by , 17 years ago) |
---|
-
plugins/autosave/langs/en.js
1 // EN lang variables2 3 tinyMCE.addToLang('',{4 autosave_unload_msg : 'The changes you made will be lost if you navigate away from this page.'5 }); -
plugins/autosave/langs/en.js
1 // EN lang variables2 3 tinyMCE.addToLang('',{4 autosave_unload_msg : 'The changes you made will be lost if you navigate away from this page.'5 }); -
plugins/wordpress/langs/en.js
Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
12 12 var metaKey = 'Alt'; 13 13 } 14 14 15 tinyMCE.add ToLang('',{15 tinyMCE.addI18n('',{ 16 16 wordpress_more_button : 'Split post with More tag (' + metaKey + '+t)', 17 17 wordpress_page_button : 'Split post with Page tag', 18 18 wordpress_adv_button : 'Show/Hide Advanced Toolbar (' + metaKey + '+v)', -
plugins/wphelp/editor_plugin.js
1 /* Import plugin specific language pack */ 2 tinyMCE.importPluginLanguagePack('wphelp', ''); 1 /* WordPress Help plugin for TinyMCE 3.x */ 3 2 4 function TinyMCE_wphelp_getControlHTML(control_name) { 5 switch (control_name) { 6 case "wphelp": 7 var titleHelp = tinyMCE.getLang('lang_help_button_title'); 8 var buttons = '<a href="javascript:tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceWordPressHelp\')" target="_self" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceWordPressHelp\');return false;"><img id="{$editor_id}_help" src="{$pluginurl}/images/help.gif" title="'+titleHelp+'" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>'; 9 var hiddenControls = '<div class="zerosize">' 10 + '<input type="button" accesskey="b" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Bold\',false);" />' 11 + '<input type="button" accesskey="i" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Italic\',false);" />' 12 + '<input type="button" accesskey="d" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Strikethrough\',false);" />' 13 + '<input type="button" accesskey="l" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'InsertUnorderedList\',false);" />' 14 + '<input type="button" accesskey="o" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'InsertOrderedList\',false);" />' 15 + '<input type="button" accesskey="w" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Outdent\',false);" />' 16 + '<input type="button" accesskey="q" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Indent\',false);" />' 17 + '<input type="button" accesskey="f" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'JustifyLeft\',false);" />' 18 + '<input type="button" accesskey="c" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'JustifyCenter\',false);" />' 19 + '<input type="button" accesskey="r" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'JustifyRight\',false);" />' 20 + '<input type="button" accesskey="a" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceLink\',true);" />' 21 + '<input type="button" accesskey="s" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'unlink\',false);" />' 22 + '<input type="button" accesskey="m" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceImage\',true);" />' 23 + '<input type="button" accesskey="t" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcewordpressmore\');" />' 24 + '<input type="button" accesskey="u" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Undo\',false);" />' 25 + '<input type="button" accesskey="y" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Redo\',false);" />' 26 + '<input type="button" accesskey="e" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceCodeEditor\',false);" />' 27 + '<input type="button" accesskey="h" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceWordPressHelp\',false);" />' 28 + '</div>'; 29 return buttons+hiddenControls; 30 } 3 (function() { 31 4 32 return ""; 33 } 5 // tinymce.PluginManager.requireLangPack('wphelp'); 6 7 tinymce.create('tinymce.plugins.WP_Help', { 8 9 init : function(ed, url) { 10 // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample'); 11 ed.addCommand('wpHelp', function() { 12 ed.windowManager.open({ 13 file : tinymce.baseURL + '/wp-mce-help.php', 14 width : 450, 15 height : 420, 16 inline : 1 17 }, { 18 plugin_url : url, // Plugin absolute URL 19 resizable : 'yes', 20 scrollbars : 'yes' 21 }); 22 }); 34 23 35 function TinyMCE_wphelp_execCommand(editor_id, element, command, user_interface, value) { 24 // Register example button 25 ed.addButton('wphelp', { 26 title : ed.getLang('advanced.help_desc'), 27 cmd : 'wpHelp', 28 image : url + '/images/help.gif' 29 }); 36 30 37 // Handle commands 38 switch (command) { 39 case "mceWordPressHelp": 40 var template = new Array(); 41 42 template['file'] = tinyMCE.baseURL + '/wp-mce-help.php'; 43 template['width'] = 480; 44 template['height'] = 380; 45 46 args = { 47 resizable : 'yes', 48 scrollbars : 'yes' 31 // Add a node change handler, selects the button in the UI when a image is selected 32 ed.onNodeChange.add(function(ed, cm, n) { 33 cm.setActive('wphelp', n.nodeName == 'IMG'); 34 }); 35 }, 36 37 getInfo : function() { 38 return { 39 longname : 'WordPress Help plugin', 40 author : 'WordPress', 41 authorurl : 'http://wordpress.org', 42 infourl : 'http://wordpress.org', 43 version : "3.0" 49 44 }; 45 } 46 }); 50 47 51 tinyMCE.openWindow(template, args); 52 return true; 53 } 54 55 // Pass to next handler in chain 56 return false; 57 } 48 // Register plugin 49 tinymce.PluginManager.add('wphelp', tinymce.plugins.WP_Help); 50 })(); -
plugins/wphelp/langs/en.js
1 // EN lang variables2 3 tinyMCE.addToLang('',{4 help_button_title : 'Help (Alt+h)'5 }); -
plugins/wphelp/langs/en.js
1 // EN lang variables2 3 tinyMCE.addToLang('',{4 help_button_title : 'Help (Alt+h)'5 }); -
wp-mce-help.php
6 6 <head> 7 7 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" /> 8 8 <title><?php _e('Rich Editor Help') ?></title> 9 <script type="text/javascript" src="tiny_mce_popup.js"></script> 9 10 <?php wp_admin_css(); ?> 10 11 <style type="text/css"> 11 12 #wphead { 12 13 padding-top: 5px; 13 padding-bottom: 5px;14 14 padding-left: 15px; 15 font-size: 90%;15 font-size: 80%; 16 16 } 17 17 #adminmenu { 18 18 padding-top: 2px; 19 padding-bottom: 2px;20 19 padding-left: 15px; 21 font-size: 94%;20 font-size: 80%; 22 21 } 23 22 #user_info { 24 margin-top: 15px; 23 right: 5%; 24 top: 5px; 25 25 } 26 26 h2 { 27 27 font-size: 2em; … … 35 35 margin-bottom: 0px; 36 36 } 37 37 #flipper { 38 margin: 5px 10px 3px; 38 margin: 0; 39 padding: 5px 20px 10px; 40 background-color: #fff; 39 41 } 42 * html { 43 overflow-x: hidden; 44 overflow-y: scroll; 45 } 40 46 #flipper div p { 41 47 margin-top: 0.4em; 42 48 margin-bottom: 0.8em; … … 72 78 } 73 79 #buttoncontainer { 74 80 text-align: center; 81 margin-bottom: 20px; 75 82 } 76 83 #buttoncontainer a, #buttoncontainer a:hover { 77 84 border-bottom: 0px; … … 106 113 c = d('content'+i.toString()); 107 114 t = d('tab'+i.toString()); 108 115 if ( n == i ) { 109 c.className = ' ';116 c.className = 'vizible'; 110 117 t.className = 'current'; 111 118 } else { 112 119 c.className = 'hidden'; … … 114 121 } 115 122 } 116 123 } 124 125 function init() { 126 document.getElementById('version').innerHTML = tinymce.majorVersion + "." + tinymce.minorVersion; 127 document.getElementById('date').innerHTML = tinymce.releaseDate; 128 } 129 tinyMCEPopup.onInit.add(init); 130 131 // For modal dialogs in IE 132 if (tinymce.isIE) 133 document.write('<base target="_self" />'); 117 134 </script> 118 135 </head> 119 136 <body> … … 132 149 <div id="content1"> 133 150 <h2><?php _e('Rich Editing Basics') ?></h2> 134 151 <p><?php _e('<em>Rich editing</em>, also called WYSIWYG for What You See Is What You Get, means your text is formatted as you type. The rich editor creates HTML code behind the scenes while you concentrate on writing. Font styles, links and images all appear approximately as they will on the internet.') ?></p> 135 <p><?php _e('WordPress includes a rich HTML editor that works well in most web browsers used today. It is powerful but it has limitations. Pasting text from other word processors may not give the results you expect. If you do not like the way the rich editor works, you may turn it off in the Your Profile and Personal Options form, under Users in the admin menu.') ?></p> 152 <p><?php _e('WordPress includes a rich HTML editor that works well in most web browsers used today. It is powerful but it has limitations. Pasting text from other word processors may not give the results you expect. For best compatibility, use the "Paste as Plain Text" or "Paste from Word" buttons located on the extended (second) toolbar row.') ?></p> 153 <p><?php _e('While using the editor, most basic keyboard shortcuts work like in any other text editor. For example: Shift+Enter inserts line break, Ctrl+C = copy, Ctrl+X = cut, Ctrl+Z = undo, Ctrl+Y = redo, Ctrl+B = bold, Ctrl+I = italic, Ctrl+U = underline, etc. (on Mac use the Apple key instead of Ctrl).') ?></p> 154 <p><?php _e('If you do not like the way the rich editor works, you may turn it off in the Your Profile and Personal Options form, under Users in the admin menu.') ?></p> 136 155 </div> 137 156 138 157 <div id="content2" class="hidden"> … … 146 165 147 166 <div id="content3" class="hidden"> 148 167 <h2><?php _e('Writing at Full Speed') ?></h2> 149 168 <p><?php _e('Rather than reaching for your mouse to click on the toolbar, use these access keys. Windows and Linux use Alt+<letter>. Macintosh uses Ctrl+<letter>.') ?></p> 150 169 <table id="keys" width="100%" border="0"> 151 170 <tr class="top"><th class="key center"><?php _e('Letter') ?></th><th class="left"><?php _e('Action') ?></th><th class="key center"><?php _e('Letter') ?></th><th class="left"><?php _e('Action') ?></th></tr> 152 171 <tr><th>n</th><td><?php _e('Check Spelling') ?></td><th>f</th><td class="align left"><?php _e('Align Left') ?></td></tr> … … 163 182 164 183 <div id="content4" class="hidden"> 165 184 <h2><?php _e('About TinyMCE'); ?></h2> 166 <p><?php printf(__('Version: %s'), '2.0.9') ?></p> 185 186 <p><?php _e('Version:'); ?> <span id="version"></span> (<span id="date"></span>)</p> 167 187 <p><?php printf(__('TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under %sLGPL</a> by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.'), '<a href="'.get_bloginfo('url').'/wp-includes/js/tinymce/license.txt" target="_blank" title="'.__('GNU Library General Public Licence').'">') ?></p> 168 <p><?php _e('Copyright © 200 5, <a href="http://www.moxiecode.com" target="_blank">Moxiecode Systems AB</a>, All rights reserved.') ?></p>188 <p><?php _e('Copyright © 2003-2007, <a href="http://www.moxiecode.com" target="_blank">Moxiecode Systems AB</a>, All rights reserved.') ?></p> 169 189 <p><?php _e('For more information about this software visit the <a href="http://tinymce.moxiecode.com" target="_blank">TinyMCE website</a>.') ?></p> 170 190 171 191 <div id="buttoncontainer">