Ensure default editor is selected

git-svn-id: https://develop.svn.wordpress.org/trunk@9019 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2008-09-28 14:21:00 +00:00
parent 56df9ace2d
commit 24418ce142
3 changed files with 39 additions and 29 deletions
+8 -8
View File
@@ -1430,15 +1430,15 @@ function the_editor($content, $id = 'content', $prev_id = 'title', $media_button
<?php if ( user_can_richedit() ) {
$wp_default_editor = wp_default_editor(); ?>
<div class="zerosize"><input accesskey="e" type="button" onclick="switchEditors.go('<?php echo $id; ?>')" /></div>
<?php if ( 'tinymce' == $wp_default_editor ) {
add_filter('the_editor_content', 'wp_richedit_pre'); ?>
<a id="edButtonHTML" onclick="switchEditors.go('<?php echo $id; ?>');"><?php _e('HTML'); ?></a>
<a id="edButtonPreview" class="active"><?php _e('Visual'); ?></a>
<?php } elseif ( 'html' == $wp_default_editor ) {
<?php if ( 'html' == $wp_default_editor ) {
add_filter('the_editor_content', 'wp_htmledit_pre'); ?>
<a id="edButtonHTML" class="active"><?php _e('HTML'); ?></a>
<a id="edButtonPreview" onclick="switchEditors.go('<?php echo $id; ?>');"><?php _e('Visual'); ?></a>
<?php }
<a id="edButtonHTML" class="active" onclick="switchEditors.go('<?php echo $id; ?>', 'html');"><?php _e('HTML'); ?></a>
<a id="edButtonPreview" onclick="switchEditors.go('<?php echo $id; ?>', 'tinymce');"><?php _e('Visual'); ?></a>
<?php } else {
add_filter('the_editor_content', 'wp_richedit_pre'); ?>
<a id="edButtonHTML" onclick="switchEditors.go('<?php echo $id; ?>', 'html');"><?php _e('HTML'); ?></a>
<a id="edButtonPreview" class="active" onclick="switchEditors.go('<?php echo $id; ?>', 'tinymce');"><?php _e('Visual'); ?></a>
<?php }
}
/* if ( $media_buttons ) { ?>
+1 -1
View File
@@ -66,7 +66,7 @@ function wp_default_scripts( &$scripts ) {
$visual_editor = apply_filters('visual_editor', array('tiny_mce'));
$scripts->add( 'editor', false, $visual_editor, '20080321' );
$scripts->add( 'editor_functions', '/wp-admin/js/editor.js', false, '20080823' );
$scripts->add( 'editor_functions', '/wp-admin/js/editor.js', false, '20080928' );
// Modify this version when tinyMCE plugins are changed.
$mce_version = apply_filters('tiny_mce_version', '20080830');