Skip to content

Commit 59a4d5b

Browse files
tyxlamcsfyouknowriad
authored
Disable TinyMCE: Dequeue mce-view (WordPress#72972)
* Disable TinyMCE: Dequeue mce-view * Add a missing dot to the comment Co-authored-by: tyxla <[email protected]> Co-authored-by: mcsf <[email protected]> Co-authored-by: youknowriad <[email protected]>
1 parent 05dc98e commit 59a4d5b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/experimental/disable-tinymce.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,15 @@ function gutenberg_enqueue_tinymce_proxy() {
4343

4444
add_action( 'admin_enqueue_scripts', 'gutenberg_enqueue_tinymce_proxy' );
4545

46+
/**
47+
* Dequeue the `mce-view` script as it was only necessary for the Classic block.
48+
*/
49+
function gutenberg_wp_enqueue_media() {
50+
wp_dequeue_script( 'mce-view' );
51+
}
52+
53+
add_action( 'wp_enqueue_media', 'gutenberg_wp_enqueue_media' );
54+
4655
/**
4756
* Example TinyMCE usage used for testing.
4857
* Uncomment line 8 in this file to enable.

0 commit comments

Comments
 (0)