Is there any way to create a rich text editor on the "Description:" field of the edit taxonomy term page, i.e.: /admin/content/taxonomy/edit/term/xx ?

I see no ready-to-go way, but one my clients wants this--we display this description on the page and he wants to edit the text there with styling etc.

Thanks.

Comments

amariotti’s picture

Depending on the WYSIWYG Editor that you are using you should be able to go into the settings and add this line to the list of pages to activate the editor on:

/admin/content/taxonomy/edit/term/*

With TinyMCE you will have to edit one of the roles and add that to the line. I think FCK is similar, but just without a users roles. Let me know if this helps.

--Andrew

FredJones’s picture

I already tried adding

admin/content/taxonomy/edit*

and it fails. I added yours also now just to be 110% sure and it also fails.

The reason is, I believe, is because the Description text box on that page doesn't allow you to define the Input Format, i.e. PHP or Full HTML, thus TinyMCE doesn't activate itself. This is my guess.

My work around is to create a new CCK type with just a title, body and one term. I tell the users to assign one term to each node of this type, and then in the code I will display the body of that node as the 'description' of that term. It's a bit of a kludge, but it will work.

Thanks.

amariotti’s picture

Is the description box that you are referring a text field or text area? (i.e. the difference between the "Subject" and "Comment" field when adding a comment on this forum)

FredJones’s picture

It's a textarea. This can be verified by looking at any Drupal installation.

Anonymous’s picture

I figured out a solution. The TinyMCE Module actually has a setting that actually disables tinymce for certain textareas. Included in this list is the 'description' field on taxonomy pages. I used // to "rem" out that line and now the tinymce editor is available to edit the Description field on my site.

Here's what that second of my tinymce.module file looks like now:

function theme_tinymce_theme($init, $textarea_name, $theme_name, $is_running) {
  switch ($textarea_name) {
    // Disable tinymce for these textareas
    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
      unset($init);
      break;

Hopefully that will help someone! As always, make sure you know what you're doing and make notes of any editing that you do to the modules.

Happy day,
Anne

amariotti’s picture

Interesting... I'll keep that in mind in the future. I kind of get annoyed with TinyMCE when it shows up on pages that I don't want it to show up on. Great job!

FredJones’s picture

Hopefully that will help someone!

Well it most certainly does! Brilliant!!

Thank you very much. :)

humanoid’s picture

Hi,

Thanks very much for this help!
But I have another problem after overwriting the tinymce_theme-function: TinyMCE edit area is displayed only about half size width and hight within this field. Even the textarea is that small when I switch tiny of. I can't figure out why he gives this wrong format/style here ??

Anybody any Idear?

Thanks and regards
Jürgen

oliver huynh’s picture

Good work, man!

No woman no cry

tonyvipi’s picture

Need some help i have been able to comment out // case 'description': // taxonomy terms as above to enable TinyMCE to appear but for some reason am not seeing any results when i reload the admin page.

Assistant would be much appreciated.

Regards,
Tony

A_Screamer’s picture

How did you get the description field to display on the taxomomy term page in the first place?

hershel’s picture

Should be that that is the default behavior. Are you seeing something different? What version of Drupal do you have?