Automatic Configuration of TinyMCE in Drupal
Join the DZone community and get the full member experience.Join For Free
Well, I always thought it sucked and caused more problems than itsolved, so I contacted Boris and asked him how he configures TinyMCE.He pointed me to a Bryght install profile for Drupal that automaticallysets up various TinyMCE profiles.
While the install profile is great, I wanted to be able to tweak thesettings just a bit and be able to configure TinyMCE on existing sites.I found this GHOP project that automatically configures TinyMCEand I decided to combine Boris's settings with this. The module alsoremoves the default line break filter for the "full HTML" input filterand expands the allowed tags for the "filtered HTML" input filter.
The result is a module that you can add to your site, run it once, thendisable it. I call it the "TinyMCE Automatic Profile Generator". I'mnot planning on making it a full drupal contribution, as I think it's alittle too specialized, but you can download it here if you'd like.
Once you run it, be sure to:
- Give the proper roles "access TinyMCE" permissions on admin/user/access
- Assign roles to each profile on admin/settings/tinymce
- the default image button is enabled for the Advanced Profile
- thefont-style-select box is enabled with a "code" style - to utilizeyou'll need to define a "code" CSS class to format programming code asdesired
Feel free to let me know of any additional configurations that you think the module should include.
Published at DZone with permission of michael anello. See the original article here.
Opinions expressed by DZone contributors are their own.