I'm running into an issue and hoping for some advice. In template.php I have added the function phptemplate_tinymce_theme for disabling TinyMCE in specific textareas. Works just fine with no problems.

The issue I'm running into is with the Organic Groups form to email all group members. If I have TinyMCE turned on, and since I'm sending the email as plaintext, the recipient receives a message filled with <p> tags surrounding the text.

The problem is the ID of the textarea is "edit-body", the same as just about every other form body in Drupal. If I modify phptemplate_tinymce_theme to disable the edit-body textarea, it's going to disable it everywhere in the site.

How can I work around this?

Comments

sgdev’s picture

Sorry, I said the "ID of the textarea is 'edit-body'", when I should have been referencing the name of the textarea, which is "body". Same problem, just referenced the wrong identifier.

gcassie’s picture

You use the php options in the TinyMCE profile to hide it on that url. Something like:

return (arg(0) == 'node' && is_numeric(arg(1)) && arg(2) != 'email') ;

I'm using this on my site and it seems to be working.

nicoloye’s picture

Issue summary: View changes
Status: Active » Closed (outdated)