Stopping TinyMCE from Inserting PRE Tags in Source View

From MODx Wiki

Jump to: navigation, search

Diagnosis

Sometimes, when getting TinyMCE to format HTML source correctly, a bug results which causes TinyMCE to insert PRE tags around the entire page after you edit it in Source View. 791928451269306765343266

Fix

Go to line 4054 (in the non-compressed version, otherwise just string search) in...

/assets/plugins/tinymce/jscripts/tiny_mce/tiny_mce.js

...and comment out these lines:

if (s.preformatted) {
	h = h.replace(/^<pre>/, '');
	h = h.replace(/<\/pre>$/, '');
	h = '<pre>' + h + '</pre>';
}
Personal tools