Editor: Provide API for the editor to be dynamically instantiated via JS. First run.

See: #35760

git-svn-id: https://develop.svn.wordpress.org/trunk@40476 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2017-04-19 02:37:29 +00:00
parent 627ba9254e
commit 8a2be37451
5 changed files with 473 additions and 143 deletions
+17
View File
@@ -3056,6 +3056,23 @@ function wp_editor( $content, $editor_id, $settings = array() ) {
_WP_Editors::editor($content, $editor_id, $settings);
}
/**
* Outputs the editor scripts, stylesheets, and default settings.
*
* The editor can be initialized when needed after page load.
* See wp.editor.initialize() in wp-admin/js/editor.js for initialization options.
*
* @uses _WP_Editors
* @since 4.8.0
*/
function wp_enqueue_editor() {
if ( ! class_exists( '_WP_Editors', false ) ) {
require( ABSPATH . WPINC . '/class-wp-editor.php' );
}
_WP_Editors::enqueue_default_editor();
}
/**
* Retrieves the contents of the search WordPress query variable.
*