WordPress Function to Set Editor Defaults to WYSIWYG or HTML

Set Editor Defaults to WYSIWYG or HTML

function my_default_editor() {
    $r = 'tinymce'; // html or tinymce
    return $r;
}
add_filter( 'wp_default_editor', 'my_default_editor' );

Here is how to remove the HTML Editor

jQuery(document).ready(function($) {
$("#edButtonHTML").remove();
});

UPDATED
here is another way to set the default editor to HTML

add_filter('wp_default_editor', create_function('', 'return "html";'));

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *