Suhayb
Suhayb

Reputation: 3271

How to set CKEditor 5 height

Using CKeditor angular component How to set the editor height?

According to the docs, it can be done by setting the editor style to:

 min-height: 500px !important;

But it doesn't work!

Upvotes: 9

Views: 17713

Answers (2)

HelpOneAnother
HelpOneAnother

Reputation: 7

You can easily set the height by using css alone, as described in their documentation.

.ck-editor__editable_inline:not(.ck-comment__input *) {
    height: 300px;
    overflow-y: auto;
}

Upvotes: 0

Maciej Bukowski
Maciej Bukowski

Reputation: 3348

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;
}

Upvotes: 30

Related Questions