ether / ep_font_color

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

Drop down menu color not updated #14

Closed Oremountainflorian closed 3 years ago

Oremountainflorian commented 4 years ago

Tested on ehterpad version 1.8.4, Firefox 76 and Win10

Problem description / steps to reproduce

Select text and color it with a new and different color. Now go to another point in the pad. The color displayed as drop down menu entry stays the same as it was selected before, even if the color where the caret is might be different.

Drop down color should have changed from blue to black in the example below

grafik

Possible solution

The color shown in the drop down menu should show the respective color dependent on the text color where the caret is placed. Implementation could be done as in ep_headings2. There the respective style appears in the menu dependent on the caret.

JohnMcLear commented 4 years ago

I implemented this on headings2 plugin, you wanna copy paste the code and submit a pr?

Oremountainflorian commented 4 years ago

@techware01 should be possible what do you think?

JohnMcLear commented 4 years ago

Afaik I implemented on font type too?

Oremountainflorian commented 3 years ago

Any news on that issue?

@JohnMcLear, do you know a public instance of Etherpad which uses ep_font_type to test if you implemented it? Thanks in advance

JohnMcLear commented 3 years ago

Refer to https://github.com/ether/ep_font_family/blob/master/static/js/index.js#L60

https://github.com/ether/ep_font_family/blob/master/static/js/index.js#L32 should be able to copy/pasted replacing family with color

Should be just a case of copy/pasting that logic and making sure the entry is in ep.json. I'd welcome seeing this as a PR 👍