Out of the box, WordPress editor defaults to the visual editor allowing for a Word like tool to easily compose your pages and posts. For the advanced users that prefer adding html to their pages and posts, WordPress offers the text editor.
There could be an instance where setting the default editor could come in-handy for example a user who adds html to their content would lose the formatting of their post if they accidentally saved the post in visual mode. By adding a WordPress filter to your functions.php file, you can easily set the default WordPress editor to either visual or text.
Simply add the filter below to your functions.php file to set the default editor.
// sets default editor to text
add_filter('wp_default_editor', create_function('', 'return "html";'));
// sets default editor to visual
add_filter('wp_default_editor', create_function('', 'return "tinymce";'));