format_for_editor


format_for_editor ( $text, $default_editor = null )

Parameters:
  • (string) text The text to be formatted.
  • (string) default_editor The default editor for the current user. It is usually either 'html' or 'tinymce'.
See:
  • _WP_Editors::editor()
Returns:
  • (string) The formatted text after filter is applied.
Defined at:

Description

Formats text for the editor.Generally the browsers treat everything inside a textarea as text, but it is still a good idea to HTML entity encode `<`, `>` and `&` in the content. The filter {@see 'format_for_editor'} is applied here. If `$text` is empty the filter will be applied to an empty string.

Related Functions

format_to_edit, edit_form_image_editor, media_send_to_editor, the_editor, format_to_post

Top Google Results

User discussions

wpseek mobile