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

See: #35760
Built from https://develop.svn.wordpress.org/trunk@40476


git-svn-id: http://core.svn.wordpress.org/trunk@40352 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz
2017-04-19 02:38:44 +00:00
parent c58cb3af9e
commit d0e4448257
10 changed files with 479 additions and 152 deletions

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.
*