CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Documentation, Book and Training Resources (Moderator: Michał Mach) »
  • Customize TinyMCE
Pages: [1]

Author Topic: Customize TinyMCE  (Read 1814 times)

herb

  • I’m new here
  • *
  • Posts: 27
  • Karma: 2
Customize TinyMCE
June 07, 2010, 06:49:08 pm
There are certain things that should be much more openly documented. For instance, how to customize the TinyMCE theme. I'm surprised to find next to nothing out there on how to do it in CiviCRM. I'll add it here and perhaps it'll find its way into the wiki docs.

First off, you'll want to create a file somewhere to write down what customizations you've made. I did it in Drupal so I made a README-CiviCRM.txt file in /default. The next time I upgrade the CiviCRM module I'll have to look that up to find out what customizations I have to save before writing over the files. (The other major one is civicrm/bin.)

Edit the file sites/all/modules/civicrm/packages/HTML/QuickForm/tinymce.php and you can use the default settings from sites/all/modules/civicrm/packages/tinymce/jscripts/tiny_mce/themes/advanced/editor_template_src.js for reference. Make a copy of tinymce.php first.

By using the reference you can add or remove various configurations to the array. For instance you can remove or add rows of buttons or individual buttons. I made a custom list of buttons like this:

theme_advanced_buttons1    : "bold,italic,|,fontsizeselect,formatselect,separator,link,unlink,separator,image,separator,numlist,bullist",

The way to remove a whole row is to make it blank. So a second row can be removed by doing this:

theme_advanced_buttons2 : "",

That was all I needed to do for my project, but you can root around there more to see what can be added, changed or removed in the file.
Web Developer
Freeform Solutions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Documentation, Book and Training Resources (Moderator: Michał Mach) »
  • Customize TinyMCE

This forum was archived on 2017-11-26.