Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Source code not wrapping in CKEditor on Firefox

When viewing the source code in an instance of CKEditor, the code is not wrapping when using Firefox (version 36.1). I have checked this with the CKEditor demo to make sure it is not my code, and this problem happens there too.

I have checked the demo in Internet Explorer 11, Opera 27.0 and Chrome 41 and the source code wraps in all of these browsers, so why is it not wrapping in Firefox?

I am using Windows 8.1.

Thanks.

like image 923
Stevio Avatar asked Mar 13 '15 17:03

Stevio


2 Answers

It's a recent change in Firefox and you can fix this by adding to your stylesheets:

textarea.cke_source {
    white-space: pre-wrap;
}

Check this ticket. This issue will be fixed in next minor CKEditor release.

like image 120
Reinmar Avatar answered Oct 24 '22 10:10

Reinmar


Thank you Reinmar. I was able to fix this by changing this style in:
ckeditor/skins/moono/editor_gecko.css

.cke_source{
font-family:'Courier New',Monospace;
font-size:small;
background-color:#fff;
white-space:pre
}

was changed to

.cke_source{
font-family:'Courier New',Monospace;
font-size:small;
background-color:#fff;
white-space:pre-wrap
}

I changed this in editor.css as well.

like image 8
Stevio Avatar answered Oct 24 '22 09:10

Stevio