RichTextBox: Highlighted text's color is set to gray when saving and reopening the file
Highlighted text's color is set to gray when saving and reopening the file.
Posted on:31 Jul 2023 13:50
We have reviewed this issue and it is caused by a limitation in the DOCX format. This is why we cannot provide a fix for this issue.
In general, the supported highlight colors can have specific values. The color palette in Word is limited to these values (see attached). In RadRichTextBox this is not limited and you are allowed to have other values as well, when using a format other than DOCX this works without issues. With the DOCX format, the nearest color is set during the export which results in the observed behavior. I have loggedt a feature request for a color palette that contains only the supported colors. You can track its progress, subscribe to status changes, and add your comment to it here: RichTextBox: Add a color palette that contains the highlight colors from the Office Open XML specification.
As a workaround, you can use the attached project that shows the custom color picker.