Developer forum

Forum » CMS - Standard features » Text wrapping in CK Editor in source mode

Text wrapping in CK Editor in source mode

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi there,

Using Firefox (version 36+), the CKEditor doesn't wrap text when you switch it to source code mode. Turns out this is a known issue, documented here: http://drupal.stackexchange.com/questions/151715/how-to-wrap-the-text-in-source-view-of-ckeditor

Two questions:

1. Can you add the code that fixes the issue (.cke_source { white-space: pre-wrap !important; }) to the standard CSS for the editor.

2. How can I work around this for the time being? I created a file called Editor.css in templates/Designs/Design and added the code. Although it's loaded, it's not applied (I assume it's for the content in the WYSIWYG part of the editor, not the editor itself). It works when I add it to /Admin/Content/ParagraphEdit.css but that'll break on an upgrade and may not be enough when loading the editor outside of a paragraph.

Thanks!

Imar


Replies

 
Dmitriy Benyuk
Reply

Hi Imar,
1) it will be fixed in TFS#22686
2) as a workaround for now you can edit the default skin "monocolor" css:
File: Admin\Editor\ckeditor\ckeditor\skins\moonocolor\editor_gecko.css
add .cke_source{white-space: pre-wrap !important;}
this should work if you are using editor with "Configuration source" set to "Configure manually".
If you are using the configuration file you need to check what skin is used there and fix the skin css file in the same way.
Regards, Dmitrij

 
Christian Rud Skovgaard
Reply

The bugfix is out in hotfix 8.8.0.7 that can be downloaded under Downloads!

 

Kind regards

Christian

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Excellent, thank you guys for the work around and hot fix!

Imar

 

You must be logged in to post in the forum