我尝试使用以下代码向 Wordpress 中的默认 Gutenberg 编辑器添加一些 CSS:
function editor_style() {
add_theme_support( 'editor-styles' );
add_editor_style( 'editor-style.css' );
}
add_action( 'after_setup_theme', 'editor_style' );
虽然这可行,但也使编辑器看起来很奇怪:
好像除了自定义样式表之外的所有样式都被删除了。这是故意的吗?我的主题里用的是 Bootstrap,我是不是也应该把 Bootstrap 也加进去?