Closed dil-bparihar closed 2 weeks ago
@dil-bparihar It's not an issue in the integration itself, as it's how CKEditor 5 supposed to work. Afair, you have to set CSS style directly on editable, like this:
.ck-editor__editable { min-height: 150px; }
In order to make it work. It's a good idea to extend API of integration though, as it's not trivial.
Is it possible to configure CSS properties like height or width for the .ck-editor__editable class in the CKEditor configuration (e.g., using a configuration like ckeditor: { height: "400px" }), without having to write inline CSS for each individual editor?
@Mati365
@dil-bparihar Nope, you can use css class
or even id
and then style it using .ck-editor__editable
selector. I'll try to extend the API a bit to use a custom plugin to archive this.
@dil-bparihar I introduced editable_height
attribute to the editor, it's now possible: https://github.com/Mati365/ckeditor5-rails/commit/1caeec9e00be16b6f6031f36b14764e7ce4a223f. Please install 1.7.0
version.
Thanks @Mati365 Its working and helps a lot.
🐛 Bug Report
Setting the height and width using the style attribute is not increasing the size of the text box.
🔍 Bug Description
A clear and concise description of what the bug is.
📝 Steps to Reproduce
✅ Expected Behavior
The CKEditor5 text box should adjust its height and width according to the values specified in the style attribute. For example, if style="height: 400px; width: 600px;" is applied, the text box should appear with a height of 400 pixels and a width of 600 pixels. A clear and concise description of what you expected to happen.
❌ Actual Behavior
The CKEditor5 text box does not change its size according to the specified style attributes. Despite setting height and width using inline styles, the text box remains at its default size and does not expand to the specified dimensions. A clear and concise description of what actually happened.
📸 Screenshots
If applicable, add screenshots to help explain your problem.
📋 Additional Context
= ckeditor5_editor initial_data: @body, name: 'email[body]',style: 'height: 300px;'