Changeset 8720 for trunk/wp-includes/general-template.php
- Timestamp:
- 08/24/2008 06:56:22 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/general-template.php
r8691 r8720 956 956 $rows = "rows='$rows'"; ?> 957 957 <div id="editor-toolbar"> 958 <?php if ( user_can_richedit() ) {958 <?php if ( user_can_richedit() && $media_buttons ) { 959 959 $wp_default_editor = wp_default_editor(); ?> 960 960 <div class="zerosize"><input accesskey="e" type="button" onclick="switchEditors.go('<?php echo $id; ?>')" /></div> … … 968 968 <a id="edButtonPreview" onclick="switchEditors.go('<?php echo $id; ?>');"><?php _e('Visual'); ?></a> 969 969 <?php } 970 } 970 } else 971 add_filter('the_editor_content', 'wp_htmledit_pre'); 971 972 972 973 /* if ( $media_buttons ) { ?> … … 982 983 </div> 983 984 984 <?php if ( 'html' != $wp_default_editor ) : ?> 985 <script type="text/javascript"> 986 // <![CDATA[ 987 if ( typeof tinyMCE != "undefined" ) 988 document.getElementById("quicktags").style.display="none"; 989 // ]]> 990 </script> 991 <?php endif; // 'html' != $wp_default_editor 992 993 $the_editor = apply_filters('the_editor', "<div id='editorcontainer'><textarea class='' $rows cols='40' name='$id' tabindex='$tab_index' id='$id'>%s</textarea></div>\n"); 985 <?php $the_editor = apply_filters('the_editor', "<div id='editorcontainer'><textarea $rows cols='40' name='$id' tabindex='$tab_index' id='$id'>%s</textarea></div>\n"); 994 986 $the_editor_content = apply_filters('the_editor_content', $content); 995 987 … … 997 989 998 990 ?> 999 1000 1001 1002 <?php if ( $prev_id && user_can_richedit() ) :?>1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 <?php endif;?>1021 1022 1023 991 <script type="text/javascript"> 992 // <![CDATA[ 993 edCanvas = document.getElementById('<?php echo $id; ?>'); 994 <?php if ( user_can_richedit() && $prev_id ) { ?> 995 // If tinyMCE is defined. 996 if ( typeof tinyMCE != 'undefined' ) { 997 // This code is meant to allow tabbing from Title to Post (TinyMCE). 998 document.getElementById('<?php echo $prev_id; ?>').onkeydown = function (e) { 999 e = e || window.event; 1000 if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) { 1001 if ( tinyMCE.activeEditor ) { 1002 if ( (jQuery("#post_ID").val() < 1) && (jQuery("#title").val().length > 0) ) { autosave(); } 1003 e = null; 1004 if ( tinyMCE.activeEditor.isHidden() ) return true; 1005 tinyMCE.activeEditor.focus(); 1006 return false; 1007 } 1008 return true; 1009 } 1010 } 1011 } 1012 <?php } ?> 1013 // ]]> 1014 </script> 1015 <?php 1024 1016 } 1025 1017
Note: See TracChangeset
for help on using the changeset viewer.