PROBLEM: I use Drupal with a rich-editor, and the rich editor likes to clobber my text by stripping out the indentation and formatting. This would be unacceptable in a desktop editor, but people seem to tolerate this with in-browser wyswigs.
QUESTION: How do I turn this off. I've searched around and I have yet to discover the best practice way of telling the rich-editor to preserve my indentation and text formatting.
add this configuration to the tinymce init script
tinymce.init({
protect: [/[\n\f\r\t\v]/g]
});
This may not be exactly what you are looking for, but the drupal htmlpurifier module can tidy up the HTML and make your HTML standard compliant. It may remove the indentation but it is very useful.
Another simpler module is htmltidy, not sure if it can preserve indentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With