This has never happened to me before, regardless of MODx version used. I am working on a site, and I have the most recent version of MODx installed. If I go to edit a chunk, everything is cool, unless I switch to TinyMCE. If I do that and switch back, all my code gets reformatted. The same thing happens as soon as I open up a document, since TinyMCE is the default editor.
Basically, anytime TinyMCE is used, all the spacing that I like to use to make my code more readable is stripped out. It’s not a deal breaker, but it is making things a real pain in the ass. Plus, all my XHTML ends up looking like crap. I am OCD, I can’t help it.
Ty in advance.
Le me also add that this happens in FF and IE.
Would it work for you to enclose the code in <pre></pre> tags?
No, that didn’t work. There has to be a reason this is happening. It’s never happened on any of the previous versions of MODx that I have used. It just doesn’t make sense to me. In the big picture, it’s not a big deal. It’s just real annoying that I can’t keep my code formatted they way I like it to be.
Really nice try, but it didn’t work. I also tried entering the custom parameters in the backend, but that failed too. Maybe I did it wrong. Oh well, I will keep trouble shooting as time permits.
Hi there,
what changes in your code exactly, and which spaces do you mean... "whitespaces" or " " ?
j
These might help:
tinyMCE.init({
mode : "textareas",
cleanup_on_startup : false,
trim_span_elements : false,
verify_html : false,
cleanup : false,
convert_urls : false,
nowrap : true,
remove_linebreaks : false,
convert_fonts_to_spans : false,
fix_content_duplication: false
});
Try Bob’s init above and try change plugin config --> to RAW encoding