Acts on text which is about to be edited.

The $content is run through esc_textarea(), which uses htmlspecialchars() to convert special characters to HTML entities. If $richedit is set to true, it is simply a holder for the ‘format_to_edit’ filter.

Signature

format_to_edit( $content, $richedit = false )
content
 (string) The text about to be edited.
richedit
 (boolean) Whether the $content should not pass through htmlspecialchars(). Default false (meaning it will be passed).
Default: false

Return

(string) The text after the filter (and possibly htmlspecialchars()) has been run.

Source

function format_to_edit( $content, $richedit = false ) {
	/**
	 * Filter the text to be formatted for editing.
	 *
	 * @since 1.2.0
	 *
	 * @param string $content The text, prior to formatting for editing.
	 */
	$content = apply_filters( 'format_to_edit', $content );
	if ( ! $richedit )
		$content = esc_textarea( $content );
	return $content;
}
WP Trac GitHub

Link here