How to set CKEditor 5 height

2019-05-10 20:27发布

I am using Angular CKEditor 5 component, I knew that setting the editor height is by adding CSS to the Style Sheet file of the component the editor gonna be hosted in.

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

But this is not working! height still sticked to one line noting that when adding the CSS rule mentioned above to the browser console it works!

1条回答
虎瘦雄心在
2楼-- · 2019-05-10 20:59

If you add it to the global stylesheet the following should work:

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

But if you want to style through the component.css you need to type this:

:host ::ng-deep .ck-editor__editable_inline {
    min-height: 500px !important;
}
查看更多
登录 后发表回答