What is the more appropriate way to implement color picker in draft.js?

use draft to implement a rich text editor, now want to achieve a color picker function, through the color selected in the palette to change the color of the selected text.
if you change the font color according to the RichUtils.toggleInlineStyle in the tutorial, you need to write the color color mapping table first, which leads to very inflexible, and you can only choose several preset colors when choosing the font color, which is very limited.
I use draft"s decorator to implement this function, but there is a flaw, the effect of the decorator can not be superimposed.

Can

be implemented in the form of Custom Block Components or other methods?

Mar.12,2021
Menu