How to allow Word Wrap in File Manager > Code Editor or Text Editor?

sneader

Well-Known Member
Aug 21, 2003
1,194
62
178
La Crosse, WI
cPanel Access Level
Root Administrator
After the 11.28 to 11.30 upgrade, I have a customer that is complaining that the Code Editor and Text Editor are no longer word wrapping. I can confirm, when editing a paragraph of data, it requires a lot of scrolling left and right. I tried it in Firefox and Chrome (did not try IE but suspect this is not a browser-dependent issue).

I do not see any option in the Editors to turn on/off word wrap, and doing some Google searches for "TinyMCE Word Wrap" found many years of postings on the subject, but no meaningful answers.

Any ideas?

- Scott
 

Infopro

Well-Known Member
May 20, 2003
17,112
514
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
Hi Scott, not sure if this might be considered a bug or Feature Request. I'm also guessing this is not TinyMCE.

When I open an index.html file (in Firefox) once by clicking the "Edit" link (or right click > edit) I get the file wrapped as expected. If I click "Use code editor" the file is no longer wrapped. If I then click "Use text editor" the file is no longer wrapped.

Opening the same index.html file using "Code editor" the file is not wrapped.

If I open a .php file with "Edit" it wraps. If opened in "Code editor" it wraps.

Switching back and forth between editors as I did above the file is wrapped on either editor.

Next if I instead select "HTML editor" on top nav, on that page that opens, at bottom of screen if I click Source tab, At top, last icon is a word wrap icon to toggle this. It works. This is wysiwygPro.

To keep this post short, there is a problem with wrapping in IE8 here for me. ;)

No clue if these are of any value, but was poking around in these two files.
/usr/local/cpanel/base/frontend/x3/filemanager/editit.html
/usr/local/cpanel/base/frontend/x3/filemanager/editit_code.html

I suggest a bug report and let cPanel tell us instead of us guessing.
 

sneader

Well-Known Member
Aug 21, 2003
1,194
62
178
La Crosse, WI
cPanel Access Level
Root Administrator
I received a response to my Bug Report. Apparently, this is not a Bug, but a FEATURE! This change is for the customer's own good -- silly customers, wanting an option to see all their code on the page so they can edit it.

Thank you for the report. I've confirmed on my test server that the word wrap feature in the editors are working as expected.

Please note that the Code Editor and the Text Editor do not have word-wrap toggles. They also should not be word wrapping because that's not how Code Editors or Text Editors normally behave. Word wrap makes it difficult to indent code properly.

If you would like to provide access to your server, we would be happy to double check and ensure that the editors on your server are behaving properly. :)
It's funny, even lowly Windows Notepad has a wrap toggle. Sometimes you want wrap, sometimes you don't, and Notepad works well for this.

Oh well...

- Scott
 
Last edited:

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,608
79
458
cPanel Access Level
Root Administrator
Scott,

I passed your inquiry along to our UI Developers as they would be in the best position to know whether this functionality changed recently.
 

sneader

Well-Known Member
Aug 21, 2003
1,194
62
178
La Crosse, WI
cPanel Access Level
Root Administrator
Thanks Info and Kenneth!!! I understand that you would not want word-wrap on all the time, so a toggle is the only real solution. I admit that I can't say for sure that word-wrap was on or available in 11.28, but this customer swears it was, until the 11.30 upgrade.

I assumed the editor was TinyMCE, so I am not sure what our options are.

Anyway, thanks to you guys for listening!

- Scott