ckeditor / ckeditor5

Powerful rich text editor framework with a modular architecture, modern integrations, and features like collaborative editing.
https://ckeditor.com/ckeditor-5
Other
9.5k stars 3.7k forks source link

Explain how to replicate "white-space: pre-wrap" behavior in ckeditor5 content #6311

Open Routhinator opened 4 years ago

Routhinator commented 4 years ago

📝 Provide a description of requested docs changes

What is the purpose and what should be changed?

Currently the docs do not seem to document a way to provide CSS to the .ck-content p element that works when trying to get white-space: pre-wrap behaviour to work in the CKEditor5 main editor element.

Based on the custom styling explaination for ckeditor5-angular https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/frameworks/angular.html#styling I have added:

.ck-editor__editable_inline p {
  white-space: pre-wrap !important;
}

And this applies the css property to the element containing the text, however if effect is ignored and \n characters are all displayed on 1 line. I need to make ckeditor use the pre-wrap behaviour for backwards compatibility.

CKEditorBot commented 1 year ago

There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.

Routhinator commented 1 year ago

Still relevant.

CKEditorBot commented 1 week ago

There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.

Routhinator commented 5 days ago

Still relevant.