wp_editor


wp_editor ( $content, $editor_id, $settings = array() )

Parameters:
  • (string) $content Initial content for the editor.
  • (string) $editor_id HTML ID attribute value for the textarea and TinyMCE. Can only be /[a-z]+/.
  • (array) $settings See _WP_Editors::editor().
See:
  • _WP_Editors::editor()
Defined at:

Description

Renders an editor.

Using this function is the proper way to output all needed components for both TinyMCE and Quicktags. _WP_Editors should not be used directly. See https://core.trac.wordpress.org/ticket/17144.

NOTE: Once initialized the TinyMCE editor cannot be safely moved in the DOM. For that reason running wp_editor() inside of a meta box is not a good idea unless only Quicktags is used. On the post edit screen several actions can be used to include additional editors containing TinyMCE: 'edit_page_form', 'edit_form_advanced' and 'dbx_post_sidebar'. See https://core.trac.wordpress.org/ticket/19173 for more information.

Related Functions

wp_image_editor, wp_credits, the_editor, wp_redirect, wp_default_editor

Top Google Results

User discussions

wpseek mobile