Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
phanletrunghieu opened this issue Jan 19, 2021 · 5 comments
Open

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

phanletrunghieu opened this issue Jan 19, 2021 · 5 comments

Comments

@phanletrunghieu
Copy link

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
Copy link
Member

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
Copy link
Author

phanletrunghieu commented Jan 19, 2021

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
Copy link
Member

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

@phanletrunghieu
Copy link
Author

phanletrunghieu commented Jan 19, 2021

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

@JohnMcLear
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants