richedit_pre filter-hookWP 2.0.0

Deprecated from version 4.3.0. It is no longer supported and can be removed in future releases. It is recommended to replace this hook with the same one.

Deprecated: 4.3.0

Filters text returned for the rich text editor.

This filter is first evaluated, and the value returned, if an empty string is passed to wp_richedit_pre(). If an empty string is passed, it results in a break tag and line feed.

If a non-empty string is passed, the filter is evaluated on the wp_richedit_pre() return after being formatted.


add_filter( 'richedit_pre', 'wp_kama_richedit_pre_filter' );

 * Function for `richedit_pre` filter-hook.
 * @param string $output Text for the rich text editor.
 * @return string
function wp_kama_richedit_pre_filter( $output ){

	// filter...
	return $output;
Text for the rich text editor.


Since 2.0.0 Introduced.
Deprecated 4.3.0

Where the hook is called

wp-includes/deprecated.php 3586
return apply_filters( 'richedit_pre', '' );
wp-includes/class-wp-editor.php 297
$content = apply_filters_deprecated( 'richedit_pre', array( $content ), '4.3.0', 'format_for_editor' );
wp-includes/deprecated.php 3594
return apply_filters( 'richedit_pre', $output );

Where the hook is used in WordPress

Usage not found.