Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
On one content type I have 3 textareas (CCK) and I would like to have different toolbar setups on different fields.
What is the best way to achieve this?
( Is there a CCK widget, JavaScript, CSS or form_alter? I would prefer the form_alter way. )
BR,
Örjan
Comments
Comment #1
rhimes CreditAttribution: rhimes commentedsubscribe
Comment #2
gaellafond CreditAttribution: gaellafond commentedI have the same issue.
I don't have a real solution, just a workaround. It can be used to set two different toolbars (Advanced or Simple) for all text fields. You can than customise those two toolbars in the CKEditor config file (ckeditor.config.js).
The workaround I found is to use Force simplified toolbar feature:
Now, I have to set a 3rd toolbar for a single field. I can't find a way to achieve this.
If you find a real solution, please, post it here!
Comment #3
orjantorang CreditAttribution: orjantorang commentedThanks!
That could have worked in my case as it looked like from the beginning, with two setups. But I was afraid of there was going to be more kind of setups so it turned in to be the CSS-solution, by simply hiding the icons in the toolbar.
Comment #4
gaellafond CreditAttribution: gaellafond commentedOh! That's a nice workaround. Thanks for the tip!
Comment #5
jcisio CreditAttribution: jcisio commentedIf you want 3 or more toolbars, change the css by Javascript. For example, if you don't want to show the "B" and "U" buttons on the edit-comment textarea, use this (untested) after the editor is initialized:
I'd recommend to ask the module maintainers to work for a prettier solution ;) #901502: Multi toolbar configuration, and different settings for each