Page 1 of 1

Add a custom color in editor's choices

Posted: Mon Mar 01, 2021 8:08 pm
by leatherboy
Hi.
I would like to ask how I could add a custom font color in the table (more colors) of the default editor.
Christos

Re: Add a custom color in editor's choices

Posted: Wed Mar 03, 2021 7:27 am
by rjcalifornia
leatherboy wrote:
Mon Mar 01, 2021 8:08 pm
Hi.
I would like to ask how I could add a custom font color in the table (more colors) of the default editor.
Christos
You will have to change the Summernote.js file, and add more colors to the colors array. I think it might be something like this:

Code: Select all

colors: [['#444444','#000000'...],
colorsName: [['CustomColorName','Black'...],

Re: Add a custom color in editor's choices

Posted: Thu Mar 04, 2021 9:30 pm
by leatherboy
You will have to change the Summernote.js file, and add more colors to the colors array. I think it might be something like this:

Code: Select all

colors: [['#444444','#000000'...],
colorsName: [['CustomColorName','Black'...],
Thank you.
It worked fine.
Christos