-
- 4,149 Posts
I haven’t really seen any central location to figure this out, so I figured I’d just post a thread here. I know this works in the latest SVN trunk, but it should theoretically work in any MODx release that has TinyMCE 2.0.6.1 installed.
To prevent TinyMCE from stripping your newlines and uglyifying your HTML, in:
/assets/plugins/tinymce/jscripts/tiny_mce/tiny_mce.js
change:
this._def("apply_source_formatting", false);
TO
this._def("apply_source_formatting", true);
AND change:
this._def("remove_linebreaks", true);
TO
this._def("remove_linebreaks", false);
And viola, nicely readable source.
shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect |
github |
splittingred.com
-
- 1,131 Posts
Heh heh...you’re one step ahead of me! I’m addressing this in the next update for the TinyMCE plugin. And, instead of altering the TinyMCE javascript file directly, I’ll be setting these parameters in the call to TinyMCE. But, yeah, your solution works too...which is ok till I get the next update out.
Jeff Whitfield
"I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
-
- 255 Posts
Alright, thanks a lot for this trick, finally the source will be human-readable as well :p