Default editor mode visual/text
-
I’d like my editor to always open in the text mode rather than the visual mode. Ideally, I’d like it to open in text mode for admins, and visual mode for editors.
I’ve tried adding some code to my functions.php file, with no success. I first tried this:
if ( current_user_can('manage_options') ) { add_filter('wp_default_editor', create_function('', 'return "html";')); } elseif ( current_user_can('edit_post') ) { add_filter( 'wp_default_editor', create_function('', 'return "tinymce";')); }
When that didn’t work, and just for an experiment, I instead tried it without the conditional, for ‘always in text mode for everyone’ like this:
add_filter('wp_default_editor', create_function('', 'return "html";'));
Neither worked. I’m wondering if there might be a conflict with my TinyMCE Advanced plugin that is preventing this from working?
Is there any kind of option for this within the TinyMCE Advanced plugin’s settings?
If this has nothing to do with the plugin, can you suggest troubleshooting steps to identify why my code is not working?
- The topic ‘Default editor mode visual/text’ is closed to new replies.