I removed the tabs from the WP editor using

wp_editor('', 'some-id', array('quicktags' => false) );

But sometimes when the page loads the TinyMCE field loads with the Text tab selected:

Rather than the HTML tab:

Is there a way maybe with JS / JQuery to make sure the tab is always the visual HTML tab?

Already tried:

add_filter( 'wp_default_editor', create_function('', 'return "tinymce";') );
  • In my experience, WordPress remembers which view you were using when you last saved a post/page/whatever. I have never looked into it deeper, to see if it's a cookie setting, or a user option, or what.
    – Pat J
    Commented May 29, 2013 at 20:58
  • Yep it does, which is annoying as I didnt want to have tabs on this box.
    – ptimson
    Commented May 29, 2013 at 21:03

2 Answers 2


I came across this page -- http://wp-snippets.com/set-default-editor/ * -- which looks promising, though a little out of date. Instead of their code, I would suggest trying this:

add_filter( 'wp_default_editor', 'wpse101200_default_editor' );
function wpse101200_default_editor( $editor ) {
    return 'tinymce';


WPSeek's wp_default_editor() page
wp_default_editor() in the WordPress core source

Unfortunately, the Codex doesn't currently have a wp_default_editor() page.

* Apparently so did you. I missed that the first time I read your question.

  • Thanks for your comment, yeah its strange that this doesnt work but I think it was being cached as a JS user setting. Ive posted my solution :)
    – ptimson
    Commented May 30, 2013 at 2:34

My solution. I found that the problem was a JS WP setting. A refresh of the page was required to make the editors initialise with the new setting

if (getUserSetting('editor') != "tinymce") {
    setUserSetting('editor', 'tinymce');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.