ether / ep_font_color

Font Color Plugin for Etherpad
Apache License 2.0
2 stars 15 forks source link

Is there any way to use a custom color? #28

Open phanletrunghieu opened 3 years ago

phanletrunghieu commented 3 years ago

I want to add a feature that users can select a color (Ex: #c3c3c3).

I try to read Etherpad's client hooks, but can't find the necessary hook.

Do you have any suggestion?

JohnMcLear commented 3 years ago

Look through the plugin source code. You will see the array of colors, you would need to store a modified array on client and server or drop the concept of statically assigned colors altogether.

phanletrunghieu commented 3 years ago

But I have to update color.css file manually. If a color is defined that not exist in color.css, it isn't shown in the browser.

Is there any hook that I can modify style attribute, instead of using class color:*?

JohnMcLear commented 3 years ago

You would generate the style attribute from the etherpad attribute. No need for the CSS as it would be inline.

phanletrunghieu commented 3 years ago

Which hook should I generate the style attribute in? I can not find the suitable hook.

JohnMcLear commented 3 years ago

I'm not at laptop to review code right now but it would be across multiple hooks.