-
Notifications
You must be signed in to change notification settings - Fork 66
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
feat: add API to set color options to RichTextEditor #6284
Conversation
...-text-editor-flow/src/main/java/com/vaadin/flow/component/richtexteditor/RichTextEditor.java
Outdated
Show resolved
Hide resolved
Quality Gate passedIssues Measures |
Quality Gate passedIssues Measures |
130cc8e
to
30e1d58
Compare
@@ -268,6 +270,32 @@ private String getDeltaValue() { | |||
return getElement().getProperty("value"); | |||
} | |||
|
|||
/** | |||
* Gets the list of colors in HEX format used by the text color picker and | |||
* background color picker controls of the text editor. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's mention that this doesn't have a default value and returns null by default. Maybe also elaborate that in this case the web component shows a default palette.
Apart from that modifying the list returned by the method doesn't do anything. Let's return an unmodifyable list which would trigger a respective exception when trying to modify it, and mention in the JavaDoc that this returns an umnodifyable list. There are some similar use cases in the repo already (e.g. setting avatar items).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, updated.
Quality Gate passedIssues Measures |
This ticket/PR has been released with Vaadin 24.5.0.alpha13 and is also targeting the upcoming stable 24.5.0 version. |
Description
Related to vaadin/web-components#7392
Type of change
Note
Currently
getColorOptions()
doesn't return the default value of the corresponding web component property.This could be probably workarounded by adding
notify: true
and using@Synchronize
annotation.