Change Redactor font color presets

Permalink
Hey, I want to change this set of colors to colors of my theme (see attached screenshot), so manager could use them easily. How can I do this?
Also, quick question - why can't I choose a font color for h1-h5 elements?

1 Attachment

 
MrKDilkington replied on at Permalink Reply 2 Attachments
MrKDilkington
Hi MaestroMagnifico,

The font color presets are hard coded into the Redactor JavaScript. Adding or removing them requires overriding the redactor.js.

Overriding redactor.js:
- download the attached zip file
- navigate to your application folder
- unzip the file into application
application\js\redactor.js
- open redactor.js
- on line 1661, there is a JavaScript array of colors in hexadecimal format
- you can add or remove colors in this array

It turns out you can add a font color for heading elements, but it requires careful text selection. See attached screenshot. Applying the color may affect a previous element's styling which may require reapplying the style.
MaestroMagnifico replied on at Permalink Reply
Thanks, I already figured this out.) But I still can't change color of heading elements no matter what. I add css-classes on blocks for this.

Why developers decided to use Redactor in the first place? It's so glitchy. CKEditor is way better. I just done my first project on C5, maybe for next one I'll find a way to replace Redactor to CKEditor.
MrKDilkington replied on at Permalink Reply
MrKDilkington
@MaestroMagnifico

The upcoming version 8 of concrete5 will be using CKEditor.

When concrete5 5.7 was being developed, I believe there were a limited number of rich text editors that supported in-context editing. Of those, Redactor was likely the best choice. Two plus years later, there are now more options for editors with in-context editing support. The best option appears to be CKEditor now.
MaestroMagnifico replied on at Permalink Reply
Sweet!
jasteele12 replied on at Permalink Reply
jasteele12
I've tried many times (including putting dummy text in front and behind) changing heading color, but it never sticks (doesn't appear at all in source mode).

Not to mention the stupid spans it adds on anything else, instead of adding the style to the containing element (not great for SEO either).

Totally hate the editor, but get a Synchronous XMLHttpRequest error message in Firefox trying to use the community_ckeditor package with 5.5.7.13 (sigh).

Too bad v8 is too unstable for my clients...
MrKDilkington replied on at Permalink Reply
MrKDilkington
@jasteele12

This tutorial covers how to write styles that don't use spans:
Adding Redactor custom styles in a theme (content block/rich text editor)
https://documentation.concrete5.org/tutorials/adding-redactor-custom...

What in particular about v8 did you find unstable?

The next version of concrete5 will include many fixes, updates, and improvements.