I am wondering if Wordpress allows us to change the onclick attribute of the tab switching in the HTML editor? For example this is the a tag for the Visual editor:

<a onclick="switchEditors.switchto(this);" class="wp-switch-editor switch-tmce" id="content-tmce">Visual</a>

I would like to know if we can easily change the value of the onclick attribute using filters? Or any other means..


  • 1
    do you want to set it default to visual editor and remove the tabs ?? Jan 7 '14 at 12:50

You can do it with help of jQuery like this:

jQuery(document).ready(function() {

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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