diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index 3fd4d94fbc..a59d3fad43 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -50,7 +50,7 @@ if (empty($post->post_status)) $post->post_status = 'draft'; ?> - + diff --git a/wp-admin/edit-form.php b/wp-admin/edit-form.php index 00e4932b31..df37430086 100644 --- a/wp-admin/edit-form.php +++ b/wp-admin/edit-form.php @@ -6,7 +6,7 @@ - + - + +
+ + - \n"); + $the_editor = apply_filters('the_editor', "\n"); $the_editor_content = apply_filters('the_editor_content', $content); printf($the_editor, $the_editor_content); diff --git a/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js b/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js index 5d7db79ee4..8d5f25774e 100644 --- a/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js +++ b/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js @@ -523,6 +523,7 @@ function switchEditors(id) { pdr.style.height = 'auto'; pdr.style.overflow = 'display'; } + wpSetDefaultEditor( 'html' ); } else { edToggle(P, H); edCloseAllTags(); // :-( @@ -557,6 +558,7 @@ function switchEditors(id) { pdr.style.height = 'auto'; pdr.style.overflow = 'display'; } + wpSetDefaultEditor( 'tinymce' ); } } @@ -568,6 +570,19 @@ function edToggle(A, B) { A.onclick = null; } +function wpSetDefaultEditor( editor ) { + try { + editor = escape( editor.toString() ); + } catch(err) { + editor = 'tinymce'; + } + + var userID = document.getElementById('user-id'); + var date = new Date(); + date.setTime(date.getTime()+(10*365*24*60*60*1000)); + document.cookie = "wordpress_editor_" + userID.value + "=" + editor + "; expires=" + date.toGMTString(); +} + function wpautop(pee) { pee = pee + "\n\n"; pee = pee.replace(new RegExp('