format_for_editor filter-hook . WP 4.3.0
Filters the text after it is formatted for the editor.
Usage
add_filter( 'format_for_editor', 'filter_function_name_1993', 10, 2 ); function filter_function_name_1993( $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
wp-includes/formatting.php 4237
return apply_filters( 'format_for_editor', $text, $default_editor );