tinymce inserting <pre> tags all over the content
forresto - February 19, 2007 - 22:26
| Project: | TinyMCE |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
When I open a page for editing, tinymce disabled, there are no tags. Enabling then disabling tinymce wraps the content with tags. This happens on every page.
is not allowed in filtered html, so it doesn't mess up the formatting, but if i save the page and then go back to edit it the formatting is wrong within tinymce, not wysiwyg.
using Drupal 5.1 and latest tinymce.module and tinymce

#1
Does it happen when you post the same content on the 5.1 demo site? That is Drupal 5.1 install with the current version of the TinyMCE module and TinyMCE code from Moxie.
#2
Hmm, no... it doesn't seem to matter which content, if I enable tinymce then disable it again, everything is wrapped in pre tags.
#3
In case this comes up again, you are enabling and disabling the module in admin > modules or are you toggling the "disable rich-text" in the posts?
I've tried both and can't reproduce this. Disabling the TinyMCE module does not rewrite the content of your node_revisions table so I don't see how it could add pre tags to your content.
Have you tried disabling every module but TinyMCE and viewing your content in a unmodified theme? I think you are going to find that something else is adding these pre tags this and you just aren't seeing it when TinyMCE is enabled.
#4
I'm toggling the "disable rich-text" in the posts, which is why I was pretty sure it was TinyMCE.
#5
I experience the same. TinyMCE is enabled by default. When I "disable rich-text" the content is enclosed in .
If I delete , then enable richt-etxt, then disable rich-text again, the are back again.
#6
I'd really like to help, but I'd have to be able to reproduce the problem on one of my sites or have access to your site. If this doesn't happen when you use the TinyMCE 5.1 demo, it's likely something specific to your install. If it does, then it could be a browser issue.
None of the people reporting this bug are giving the browser version, TinyMCE version, TinyMCE module version, buttons activated, additional modules installed, etc.
#7
please check if preformatted is turned to "false" in "TinyMCE settings" "Edit tinymce profile", "Cleanup and output", "Preformatted"
if true you get everywhere ;)
#8
@ TSE:
Thanks, this solved the problem for me.
@ TinyMCE module maintainers:
I believe this still is a TinyMCE bug. At least a user interface bug, and probably just a bug. To me it's completely incomprehensible as to how and why TinyMCE works this way. If I want to work in the HTML code directly TinyMCE should leave it alone.
#9
ditto to gaele
#10
@ TSE:
This seems to have worked for me too.
Thank you.
#11
For russian translation - you must set "Cleanup and output" > "Отформатированный текст" to false
#12
You can also turn off tinymce for specific textarea by adding this function to your theme template.php file (check out the readme.txt file in your timymce module install folder):
function phptemplate_tinymce_theme($init, $textarea_name, $theme_name, $is_running) {
switch ($textarea_name) {
// Disable tinymce for these textareas
case 'field-user-email-copy-value':
case 'webform-additional-validate':
unset($init);
break;
...
}
// Always return $init
return $init;
}