Changeset 6694 for trunk/wp-includes/general-template.php
- Timestamp:
- 01/31/2008 06:10:46 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/general-template.php
r6682 r6694 929 929 $wp_default_editor = wp_default_editor(); 930 930 $active = " class='active'"; 931 $inactive = " onclick='switchEditors (\"$id\");'";931 $inactive = " onclick='switchEditors.go(\"$id\");'"; 932 932 933 933 if ( 'tinymce' == $wp_default_editor ) 934 934 add_filter('the_editor_content', 'wp_richedit_pre'); 935 935 936 // The following line moves the border so that the active button "attaches" to the toolbar. Only IE needs it. 937 ?> 938 936 // The following line moves the border so that the active button "attaches" to the toolbar. Only IE needs it. 937 ?> 938 <style type="text/css"> 939 939 #postdivrich table, #postdivrich #quicktags {border-top: none;} 940 940 #quicktags {border-bottom: none; padding-bottom: 2px; margin-bottom: -1px;} 941 941 </style> 942 942 943 <div id='editor-toolbar' style='display:none;'> 943 <div class='zerosize'><input accesskey='e' type='button' onclick='switchEditors ("<?php echo $id; ?>")' /></div>944 <div class='zerosize'><input accesskey='e' type='button' onclick='switchEditors.go("<?php echo $id; ?>")' /></div> 944 945 <a id='edButtonHTML'<?php echo 'html' == $wp_default_editor ? $active : $inactive; ?>><?php _e('HTML'); ?></a> 945 946 <a id='edButtonPreview'<?php echo 'tinymce' == $wp_default_editor ? $active : $inactive; ?>><?php _e('Visual'); ?></a> … … 974 975 <?php endif; // 'html' != $wp_default_editor 975 976 976 $the_editor = apply_filters('the_editor', "<div ><textarea class='' $rows cols='40' name='$id' tabindex='2' id='$id'>%s</textarea></div>\n");977 $the_editor = apply_filters('the_editor', "<div id='editorcontainer'><textarea class='' $rows cols='40' name='$id' tabindex='2' id='$id'>%s</textarea></div>\n"); 977 978 $the_editor_content = apply_filters('the_editor_content', $content); 978 979 … … 987 988 if ( typeof tinyMCE != 'undefined' ) { 988 989 // This code is meant to allow tabbing from Title to Post (TinyMCE). 989 if ( tinyMCE.isMSIE ) { 990 document.getElementById('<?php echo $prev_id; ?>').onkeydown = function (e) { 991 if ( tinyMCE.idCounter == 0 ) 992 return true; 993 e = e ? e : window.event; 994 if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) { 995 var i = tinyMCE.getInstanceById('<?php echo $id; ?>'); 996 if(typeof i == 'undefined') 997 return true; 998 tinyMCE.execCommand("mceStartTyping"); 999 this.blur(); 1000 i.contentWindow.focus(); 1001 e.returnValue = false; 1002 return false; 1003 } 1004 } 1005 } else { 1006 document.getElementById('<?php echo $prev_id; ?>').onkeypress = function (e) { 1007 if ( tinyMCE.idCounter == 0 ) 1008 return true; 1009 e = e ? e : window.event; 1010 if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) { 1011 var i = tinyMCE.getInstanceById('<?php echo $id; ?>'); 1012 if(typeof i == 'undefined') 1013 return true; 1014 tinyMCE.execCommand("mceStartTyping"); 1015 this.blur(); 1016 i.contentWindow.focus(); 1017 e.returnValue = false; 1018 return false; 1019 } 1020 } 1021 } 990 document.getElementById('<?php echo $prev_id; ?>').onkeydown = function (e) { 991 e = e || window.event; 992 if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) { 993 if ( tinyMCE.activeEditor ) { 994 e = null; 995 if ( tinyMCE.activeEditor.isHidden() ) return true; 996 tinyMCE.activeEditor.focus(); 997 return false; 998 } 999 return true; 1000 } 1001 } 1022 1002 } 1023 1003 <?php endif; ?>
Note: See TracChangeset
for help on using the changeset viewer.