Find out which editor should be displayed by default.

Works out which of the two editors to display as the current editor for a user. The ‘html’ setting is for the “Text” editor tab.

Signature

wp_default_editor()

Return

(string) Either 'tinymce', or 'html', or 'test'

Source

function wp_default_editor() {
	$r = user_can_richedit() ? 'tinymce' : 'html'; // defaults
	if ( wp_get_current_user() ) { // look for cookie
		$ed = get_user_setting('editor', 'tinymce');
		$r = ( in_array($ed, array('tinymce', 'html', 'test') ) ) ? $ed : $r;
	}

	/**
	 * Filter which editor should be displayed by default.
	 *
	 * @since 2.5.0
	 *
	 * @param array $r An array of editors. Accepts 'tinymce', 'html', 'test'.
	 */
	return apply_filters( 'wp_default_editor', $r );
}
WP Trac GitHub

Link here