Skip to content

Commit

Permalink
TinyMCE use the Core TinyMCE version to avoid conflicts (#6848)
Browse files Browse the repository at this point in the history
* TinyMCE use the Core TinyMCE version to avoid conflicts

* Remove jQuery dependency
  • Loading branch information
youknowriad authored May 21, 2018
1 parent 3b48420 commit 2bb8e93
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions lib/client-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ function gutenberg_register_scripts_and_styles() {
gutenberg_register_vendor_scripts();

// WordPress packages.
wp_register_script( 'wp-tinymce', includes_url( 'js/tinymce/' ) . 'wp-tinymce.php', array() );

wp_register_script(
'wp-dom-ready',
gutenberg_url( 'build/dom-ready/index.js' ),
Expand Down Expand Up @@ -130,7 +132,7 @@ function gutenberg_register_scripts_and_styles() {
wp_register_script(
'wp-dom',
gutenberg_url( 'build/dom/index.js' ),
array( 'tinymce-latest', 'lodash' ),
array( 'wp-tinymce', 'lodash' ),
filemtime( gutenberg_dir_path() . 'build/dom/index.js' ),
true
);
Expand Down Expand Up @@ -331,7 +333,7 @@ function gutenberg_register_scripts_and_styles() {
'wp-plugins',
'wp-utils',
'wp-viewport',
'tinymce-latest',
'wp-tinymce',
'tinymce-latest-lists',
'tinymce-latest-paste',
'tinymce-latest-table',
Expand Down Expand Up @@ -495,25 +497,21 @@ function gutenberg_register_vendor_scripts() {
'https://unpkg.com/moment@2.22.1/' . $moment_script,
array()
);
$tinymce_version = '4.7.2';
gutenberg_register_vendor_script(
'tinymce-latest',
'https://unpkg.com/tinymce@' . $tinymce_version . '/tinymce' . $suffix . '.js'
);
$tinymce_version = '4.7.11';
gutenberg_register_vendor_script(
'tinymce-latest-lists',
'https://unpkg.com/tinymce@' . $tinymce_version . '/plugins/lists/plugin' . $suffix . '.js',
array( 'tinymce-latest' )
array( 'wp-tinymce' )
);
gutenberg_register_vendor_script(
'tinymce-latest-paste',
'https://unpkg.com/tinymce@' . $tinymce_version . '/plugins/paste/plugin' . $suffix . '.js',
array( 'tinymce-latest' )
array( 'wp-tinymce' )
);
gutenberg_register_vendor_script(
'tinymce-latest-table',
'https://unpkg.com/tinymce@' . $tinymce_version . '/plugins/table/plugin' . $suffix . '.js',
array( 'tinymce-latest' )
array( 'wp-tinymce' )
);
gutenberg_register_vendor_script(
'lodash',
Expand Down

0 comments on commit 2bb8e93

Please sign in to comment.