Ticket #2598: mce205sc.diff
| File mce205sc.diff, 9.7 KB (added by skeltoac, 6 years ago) |
|---|
-
wp-admin/edit-page-form.php
130 130 131 131 <fieldset id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>"> 132 132 <legend><?php _e('Page Content') ?></legend> 133 <?php 134 $rows = get_settings('default_post_edit_rows'); 135 if (($rows < 3) || ($rows > 100)) { 136 $rows = 10; 137 } 138 ?> 139 <?php the_quicktags(); ?> 140 141 <div><textarea title="true" rows="<?php echo $rows; ?>" cols="40" name="content" tabindex="4" id="content"><?php echo user_can_richedit() ? wp_richedit_pre($post->post_content) : $post->post_content; ?></textarea></div> 133 <?php the_editor($post->post_content); ?> 142 134 </fieldset> 143 135 144 <script type="text/javascript">145 <!--146 edCanvas = document.getElementById('content');147 <?php if ( user_can_richedit() ) : ?>148 // This code is meant to allow tabbing from Title to Post (TinyMCE).149 if ( tinyMCE.isMSIE )150 document.getElementById('title').onkeydown = function (e)151 {152 e = e ? e : window.event;153 if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) {154 var i = tinyMCE.selectedInstance;155 if(typeof i == 'undefined')156 return true;157 tinyMCE.execCommand("mceStartTyping");158 this.blur();159 i.contentWindow.focus();160 e.returnValue = false;161 return false;162 }163 }164 else165 document.getElementById('title').onkeypress = function (e)166 {167 e = e ? e : window.event;168 if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) {169 var i = tinyMCE.selectedInstance;170 if(typeof i == 'undefined')171 return true;172 tinyMCE.execCommand("mceStartTyping");173 this.blur();174 i.contentWindow.focus();175 e.returnValue = false;176 return false;177 }178 }179 <?php endif; ?>180 //-->181 </script>182 183 136 <p class="submit"> 184 137 <input name="save" type="submit" id="save" tabindex="3" value="<?php _e('Save and Continue Editing'); ?>" /> 185 138 <input type="submit" name="submit" value="<?php _e('Save') ?>" style="font-weight: bold;" tabindex="4" /> -
wp-admin/edit-form-comment.php
37 37 38 38 <fieldset style="clear: both;"> 39 39 <legend><?php _e('Comment') ?></legend> 40 <?php the_quicktags(); ?> 41 42 <?php 43 $rows = get_settings('default_post_edit_rows'); 44 if (($rows < 3) || ($rows > 100)) { 45 $rows = 10; 46 } 47 ?> 48 <div><textarea title="true" rows="<?php echo $rows; ?>" cols="40" name="content" tabindex="4" id="content" style="width: 99%"><?php echo user_can_richedit() ? wp_richedit_pre($comment->comment_content) : $comment->comment_content; ?></textarea></div> 40 <?php the_editor($comment->comment_content, 'content', 'newcomment_author_url'); ?> 49 41 </fieldset> 50 42 51 <script type="text/javascript">52 <!--53 edCanvas = document.getElementById('content');54 <?php if ( user_can_richedit() ) : ?>55 // This code is meant to allow tabbing from Author URL to Post (TinyMCE).56 if ( tinyMCE.isMSIE )57 document.getElementById('newcomment_author_url').onkeydown = function (e)58 {59 e = e ? e : window.event;60 if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) {61 var i = tinyMCE.selectedInstance;62 if(typeof i == 'undefined')63 return true;64 tinyMCE.execCommand("mceStartTyping");65 this.blur();66 i.contentWindow.focus();67 e.returnValue = false;68 return false;69 }70 }71 else72 document.getElementById('newcomment_author_url').onkeypress = function (e)73 {74 e = e ? e : window.event;75 if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) {76 var i = tinyMCE.selectedInstance;77 if(typeof i == 'undefined')78 return true;79 tinyMCE.execCommand("mceStartTyping");80 this.blur();81 i.contentWindow.focus();82 e.returnValue = false;83 return false;84 }85 }86 <?php endif; ?>87 //-->88 </script>89 90 43 <p class="submit"><input type="submit" name="editcomment" id="editcomment" value="<?php echo $submitbutton_text ?>" style="font-weight: bold;" tabindex="6" /> 91 44 <input name="referredby" type="hidden" id="referredby" value="<?php echo $_SERVER['HTTP_REFERER']; ?>" /> 92 45 </p> -
wp-admin/edit-form-advanced.php
143 143 <fieldset id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>"> 144 144 <legend><?php _e('Post') ?></legend> 145 145 146 <?php 147 $rows = get_settings('default_post_edit_rows'); 148 if (($rows < 3) || ($rows > 100)) { 149 $rows = 12; 150 } 151 ?> 152 <?php the_quicktags(); ?> 146 <?php the_editor($post->post_content); ?> 153 147 154 <div><textarea <?php if ( user_can_richedit() ) echo 'title="true" '; ?>rows="<?php echo $rows; ?>" cols="40" name="content" tabindex="2" id="content"><?php echo user_can_richedit() ? wp_richedit_pre($post->post_content) : $post->post_content; ?></textarea></div>155 </fieldset>156 157 <script type="text/javascript">158 <!--159 edCanvas = document.getElementById('content');160 <?php if ( user_can_richedit() ) : ?>161 // This code is meant to allow tabbing from Title to Post (TinyMCE).162 if ( tinyMCE.isMSIE )163 document.getElementById('title').onkeydown = function (e)164 {165 e = e ? e : window.event;166 if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) {167 var i = tinyMCE.selectedInstance;168 if(typeof i == 'undefined')169 return true;170 tinyMCE.execCommand("mceStartTyping");171 this.blur();172 i.contentWindow.focus();173 e.returnValue = false;174 return false;175 }176 }177 else178 document.getElementById('title').onkeypress = function (e)179 {180 e = e ? e : window.event;181 if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) {182 var i = tinyMCE.selectedInstance;183 if(typeof i == 'undefined')184 return true;185 tinyMCE.execCommand("mceStartTyping");186 this.blur();187 i.contentWindow.focus();188 e.returnValue = false;189 return false;190 }191 }192 <?php endif; ?>193 //-->194 </script>195 196 148 <?php echo $form_pingback ?> 197 149 <?php echo $form_prevstatus ?> 198 150 -
wp-admin/admin-header.php
48 48 </script> 49 49 <script type="text/javascript" src="../wp-includes/js/dbx-key.js"></script> 50 50 <?php } ?> 51 <?php if ( $editing && user_can_richedit() ) { ?> 52 <script type="text/javascript" src="../wp-includes/js/tinymce/tiny_mce_gzip.php?ver=20051211"></script> 53 <?php } ?> 51 <?php if ( $editing && user_can_richedit() ) { tinymce_include(); } ?> 54 52 <?php if ( $cat_js ) { ?> 55 53 <script type="text/javascript" src="cat-js.php"></script> 56 54 <?php } ?> -
wp-includes/functions-post.php
1002 1002 return array('file' => $new_file, 'url' => $url, 'error' => false); 1003 1003 } 1004 1004 1005 /** 1006 * Places two script links in <head>: one to get tinyMCE (big), one to configure and start it (small) 1007 */ 1008 function tinymce_include() { 1009 $src1 = get_settings('siteurl') . '/wp-includes/js/tinymce/tiny_mce_gzip.php'; 1010 $src2 = get_settings('siteurl') . '/wp-includes/js/tinymce/tiny_mce_config.php'; 1011 1012 echo "<script type='text/javascript' src='$src1'></script>\n"; 1013 echo "<script type='text/javascript' src='$src2'></script>\n"; 1014 } 1015 1016 /** 1017 * Places a textarea according to the current user's preferences, filled with $content. 1018 * Also places a script block that enables tabbing between Title and Content. 1019 * 1020 * @param string Editor contents 1021 * @param string (optional) Previous form field's ID (for tabbing support) 1022 */ 1023 function the_editor($content, $id = 'content', $prev_id = 'title') { 1024 $rows = get_settings('default_post_edit_rows'); 1025 if (($rows < 3) || ($rows > 100)) 1026 $rows = 12; 1027 1028 $rows = "rows='$rows'"; 1029 1030 the_quicktags(); 1031 1032 if ( user_can_richedit() ) 1033 add_filter('the_editor_content', 'wp_richedit_pre'); 1034 1035 $the_editor = apply_filters('the_editor', "<div><textarea class='mceEditor' $rows cols='40' name='$id' tabindex='2' id='$id'>%s</textarea></div>\n"); 1036 $the_editor_content = apply_filters('the_editor_content', $content); 1037 1038 printf($the_editor, $the_editor_content); 1039 1040 ?> 1041 <script type="text/javascript"> 1042 //<!-- 1043 edCanvas = document.getElementById('<?php echo $id; ?>'); 1044 <?php if ( user_can_richedit() ) : ?> 1045 // This code is meant to allow tabbing from Title to Post (TinyMCE). 1046 if ( tinyMCE.isMSIE ) 1047 document.getElementById('<?php echo $prev_id; ?>').onkeydown = function (e) 1048 { 1049 e = e ? e : window.event; 1050 if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) { 1051 var i = tinyMCE.selectedInstance; 1052 if(typeof i == 'undefined') 1053 return true; 1054 tinyMCE.execCommand("mceStartTyping"); 1055 this.blur(); 1056 i.contentWindow.focus(); 1057 e.returnValue = false; 1058 return false; 1059 } 1060 } 1061 else 1062 document.getElementById('<?php echo $prev_id; ?>').onkeypress = function (e) 1063 { 1064 e = e ? e : window.event; 1065 if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) { 1066 var i = tinyMCE.selectedInstance; 1067 if(typeof i == 'undefined') 1068 return true; 1069 tinyMCE.execCommand("mceStartTyping"); 1070 this.blur(); 1071 i.contentWindow.focus(); 1072 e.returnValue = false; 1073 return false; 1074 } 1075 } 1076 <?php endif; ?> 1077 //--> 1078 </script> 1079 <?php 1080 } 1081 1005 1082 ?>
