Merge pull request #2073 from IanDelMar/classic-editor-body-margin
Fix TinyMCE body margin
This commit is contained in:
commit
1747a156e4
|
|
@ -82,6 +82,18 @@ if ( ! function_exists( 'understrap_tiny_mce_before_init' ) ) {
|
|||
}
|
||||
|
||||
$settings['style_formats'] = wp_json_encode( $style_formats );
|
||||
|
||||
/*
|
||||
* Fix TinyMCE editor body margin that is set to 0 by Bootstrap's
|
||||
* _reboot.scss (v4 & v5). `margin: 9px 10px` is the value used by WP's
|
||||
* TinyMCE skin (/wp-includes/js/tinymce/skins/wordpress/wp-content.css).
|
||||
*/
|
||||
if ( isset( $settings['content_style'] ) ) {
|
||||
$settings['content_style'] .= ' body#tinymce { margin: 9px 10px; }';
|
||||
} else {
|
||||
$settings['content_style'] = 'body#tinymce { margin: 9px 10px; }';
|
||||
}
|
||||
|
||||
return $settings;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue