diff --git a/lib/compat.php b/lib/compat.php index 44b2c8d3f94b4a..1c33d2cf38c32c 100644 --- a/lib/compat.php +++ b/lib/compat.php @@ -86,6 +86,39 @@ function gutenberg_disable_editor_settings_wpautop( $settings ) { } add_filter( 'wp_editor_settings', 'gutenberg_disable_editor_settings_wpautop' ); +/** + * Add TinyMCE fixes for the Classic Editor. + * + * @see https://core.trac.wordpress.org/ticket/44308 + */ +function gutenberg_add_classic_editor_fixes() { + // Temp add the fix for not creating paragraphs from HTML comments. + // TODO: remove after 4.9.7, this should be in core. + $script = <<\s+\s*\\n\\n