format_for_editor filter-hookWP 4.3.0

Filters the text after it is formatted for the editor.

Usage

add_filter( 'format_for_editor', 'wp_kama_format_for_editor_filter', 10, 2 );

/**
 * Function for `format_for_editor` filter-hook.
 * 
 * @param string $text           The formatted text.
 * @param string $default_editor The default editor for the current user. It is usually either 'html' or 'tinymce'.
 *
 * @return string
 */
function wp_kama_format_for_editor_filter( $text, $default_editor ){

	// filter...
	return $text;
}
$text(string)
The formatted text.
$default_editor(string)
The default editor for the current user. It is usually either 'html' or 'tinymce'.

Changelog

Since 4.3.0 Introduced.

Where the hook is called

format_for_editor()
format_for_editor
wp-includes/formatting.php 4292
return apply_filters( 'format_for_editor', $text, $default_editor );

Where the hook is used in WordPress

Usage not found.