Prevent CKEditor from fixing / fixing (invalid) HTML code

I recently upgraded FCKEditor to a CKEditor module on a website running Drupal 6.

Some pages on the website have invalid (x) HTML, mostly block elements within inline elements. Before anyone edits the page, the content will be displayed live on the website as it should appear.

However, when the admin proceeds to edit the page and the edited content appears in the CKEditor's WYSIWYG view, it tries to "fix" the invalid code successfully.

My question is how to prevent CKEditor from rewriting code in WYSIWYG mode?

Here is some sample code: Should / what I need:

<a class="link-block" href="index.html"><h2>My Header</h2><p>Some text.</p></a>

Result after saving the editor:

<h2><a class="link-block" href="index.html">My Header</a></h2><p><a class="link-block" href="index.html">Some text.</a></p>

Before I despise anyone, I know that the code must be valid according to the W3C specs, however I did not create a website and recode the whole thing would be a monumental task.

+3


source to share


1 answer


if you are using FCEditor with the wysiwyg module, go to YOURSITE/admin/config/content/wysiwyg/profile/full_html/edit

, then open the "Cleanup and Output" section and uncheck the "Check HTML" checkbox.



+1


source







All Articles