i have added
$htmlEditorConfig->insertButtonsAfter('formatselect', 'forecolor');
in my CustomLeftAndMainDecorator.
this shows the whole palette of colors in the cms.
How can the color-palette be reduced to some custom colors?
Ive searched the web for hours - no soution found.
thanks.timo.
We've moved the forum!
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
Hi timo,
depending on how many colors you need i'd use css classes instead of the color attribute.
https://github.com/jonom/silverstripe-tinytidy/blob/master/_config.php has some pretty standard configs to copy/paste which could get you started.
hth, wmk
Hi wmk!
Thanks for pointing me to this.
Isnt there a soultion with e.g. a color-array to set somehow?
timo.
in the end i found a solution:
$htmlEditorConfig->insertButtonsAfter('formatselect', 'forecolor');
$htmlEditorConfig->setOption('theme_advanced_text_colors', "FF00FF,FFFF00,00FF00,FF0000,0000FF,000000");
$htmlEditorConfig->setOption('theme_advanced_more_colors', false);
Hey timo,
glad you got it working.
Thanks for sharing your solution!