When I add text fields to a CCK content type, and set the field as Plain Text (as opposed to Filtered Text), TinyMCE still appears on the textarea on the node edit form, and, thus, inserts html tags into the content.

TinyMCE is not appearing on non-cck plain text fields, such as the 'log message' field.

This is the 5.1 version of the tinymce module, Drupal 5.1, TinyMCE 2.1.

Anybody else experiencing this?

Thanks!

CommentFileSizeAuthor
#7 tiny_fields.zip5.81 KBliquidcms

Comments

ashtonium’s picture

Yes, I'm seeing this. Not sure if it's an issue with TinyMCE or with CCK. I'm using cck 5.x-1.5

I'm not at all familiar with how this is determined on either end though so I'm probably not going to be of much help yet.

kreynen’s picture

Richard Eriksson wrote a Handbook page about using TinyMCE with CCK that is included in the TinyMCE FAQ. This sounds like the opposite approach to what you are describing (activating TinyMCE for specific fields vs. turning it off for specific fields), but it might help you figure out a configuration that does what you're looking for.

Currently the only way I know to disable TinyMCE for a specific field is to add that fieldname to the list found at line 286 in tinymce.module after...

// Disable tinymce for these textareas

By default, TinyMCE is disabled to the following fields...

case 'log': // book and page log
case 'img_assist_pages':
case 'caption': // signature
case 'pages':
case 'access_pages': //TinyMCE profile settings.
case 'user_mail_welcome_body': // user config settings
case 'user_mail_approval_body': // user config settings
case 'user_mail_pass_body': // user config settings
case 'synonyms': // taxonomy terms
case 'description': // taxonomy terms

Wimmmmm’s picture

I have the same problem over here!

davej’s picture

The TinyMCE README describes how to selectively disable fields. Rather than edit tinymce.module, copy the function theme_tinymce_theme to your template.php file (assuming you're using a phptemplate-based theme) as phptemplate_tinymce_theme and make your customisations there.

liquidcms’s picture

ideally there would be a module that adds a field setting (incorrectly called "Data Settings" on the field def form) that would let you assign a tiny theme array to a field.

I am looking at coding up this module; but i think will be more of a pain than i thought since i dont think cck allows other modules to add features to field modules.

will post results if i get anywhere

OpenChimp’s picture

Be sure to convert non-alphanumeric characters to hyphens.

I tried to follow these steps because I needed to disable TinyMCE on the Signup module fields which are for writing up plain text email contents.

I thought I was doing everything correctly but nothing was changing.

There are two fields with the names:
signup_reminder_email
signup_confirmation_email

So I added the following to the switch in the theme function as described in the read me file. The code below did NOT work.

case 'signup_reminder_email': // signup module f1
case 'signup_confirmation_email': // signup module f2

I was stuck for a long time, debugging other things that I thought might be causing the problem. It turned out that I just needed to convert the underscores(_) to hyphens(-). The code below works perfectly.

case 'signup-reminder-email': // signup module f1
case 'signup-confirmation-email': // signup module f2

The same seems to apply to cck fields, so "field_schedule_notes[0][value]" becomes "field-schedule-notes-0-value"

liquidcms’s picture

StatusFileSize
new5.81 KB

Feel free to check this out. This is a new module i am working on (we use it now on a couple projects) but haven't tested it enough yet to add as a project on d.org.

tiny_fields is a module that lets you specify specific types/fields to enable different tiny themes on. Not sure why this isn't the default approach to using Tiny.. but maybe someday.

BTW - the zip file includes a patch to the tiny module that is required to let tiny interact with other modules.

PLEASE NOTE: i can't support this module at the moment; but hope to have it as an official project here soon.

Peter Lindstrom
LiquidCMS - Content Management Solution Experts

pomliane’s picture

Status: Active » Closed (won't fix)

This version of TinyMCE is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.

This issue has been automagically closed by a script.