How to customize the colours available in the HTML editor?

How to customize the colours available in the HTML editor?

by Przemyslaw Stencel -
Number of replies: 1

How can I customize the colours which are available in the TinyMCE editor? I would like to replace some of the colours in the palette with other colours. Which file(s) do I need to edit?

Thanks in advance for any help,

Przemek

palette of colours

Average of ratings: -
In reply to Przemyslaw Stencel

Re: How to customize the colours available in the HTML editor?

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Przemyslaw Stencel,

The primary set of colors you show in your picture seem to be in yourmoodle/lib/editor/tinymce/tiny_mce/version.number.folder/tiny_mce.js

The six digit hex numbers are about halfway through the file. Just search for 6 zeros (000000) to find the first one, then all forty are there together.

Of course if you just click on the hot link, "More Colors" you get a 'Select a color' dialog window with three tabs at the top. The "Picker" tab lets you pick any color or type any hex color number in the Color: box.

The second tab, 'Palette', lets you choose from 216 different hex numbered colors or type a hex number in the Color: box just below all the colors.

The third tab, 'Named,' lets you pick from another 143 named colors and you can also type in a hex number just below all the colors.

The file for the 'Palette' and 'Named' colors is located at yourmoodle/lib/editor/tinymce/tiny_mce/version.number.folder/themes/advanced/js/color_picker.js

They are a lot easier to spot in the file than the primary ones are.

Hope this helps,

AL

Average of ratings: Useful (1)