首页 > 解决方案 > 如何设置CKEditor 5高度

问题描述

使用CKeditor角度组件如何设置编辑器高度?

根据文档,可以通过将编辑器样式设置为:

 min-height: 500px !important;

但它不起作用!

标签: angularckeditorshadow-domckeditor5

解决方案


如果将其添加到全局样式表中,则以下内容应该有效:

.ck-editor__editable_inline {
    min-height: 500px !important;
}

但是如果你想通过component.css你需要输入这个样式:

:host ::ng-deep .ck-editor__editable_inline {
    min-height: 500px !important;
}

推荐阅读