Title: htmledit_pre
Published: April 25, 2014
Last modified: April 28, 2025

---

# apply_filters( ‘htmledit_pre’, string $output )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/htmledit_pre/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/htmledit_pre/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/htmledit_pre/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/htmledit_pre/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/htmledit_pre/?output_format=md#wp--skip-link--target)

This hook has been deprecated since 4.3.0.

Filters the text before it is formatted for the HTML editor.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/htmledit_pre/?output_format=md#parameters)󠁿

 `$output`string

The HTML-formatted text.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/htmledit_pre/?output_format=md#source)󠁿

    ```php
    return apply_filters( 'htmledit_pre', $output );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/deprecated.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/deprecated.php#L3638)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/deprecated.php#L3638-L3638)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/htmledit_pre/?output_format=md#related)󠁿

| Used by | Description | 
| [wp_htmledit_pre()](https://developer.wordpress.org/reference/functions/wp_htmledit_pre/)`wp-includes/deprecated.php` |

Formats text for the HTML editor.

  | 
| [_WP_Editors::editor()](https://developer.wordpress.org/reference/classes/_wp_editors/editor/)`wp-includes/class-wp-editor.php` |

Outputs the HTML for a single instance of the editor.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/htmledit_pre/?output_format=md#changelog)󠁿

| Version | Description | 
| [4.3.0](https://developer.wordpress.org/reference/since/4.3.0/) | Deprecated.  | 
| [2.5.0](https://developer.wordpress.org/reference/since/2.5.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fhtmledit_pre%2F)
before being able to contribute a note or feedback.