Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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..

Thanks.

share|improve this question
1  
do you want to set it default to visual editor and remove the tabs ?? –  Abhishek Jan 7 at 12:50

1 Answer 1

You can do it with help of jQuery like this:

jQuery(document).ready(function() {
   jQuery('.switch-tmce').trigger('click');
});
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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