Open alelordelo opened 2 months ago
Hi @alelordelo
Thank you for the very detailed bug report.
I'm very busy with other projects at the moment, but am planning to revisit this project later. Until then, I'm happy to look at any PR or code that could help fix this.
Description
I'm encountering an issue where the
RichTextHighlightingStyle
is not being applied correctly in theRichTextEditor
. Despite setting a custom highlighting style, the text remains unhighlighted and the foreground color is not changing as expected.Steps to Reproduce
RichTextHighlightingStyle
with a custom foreground color (e.g., red).RichTextEditor
in a SwiftUI view.Expected Behavior
The highlighted text should appear with the custom foreground color (red in this case).
Actual Behavior
The foreground color does not change.
Code Sample
Additional Context
I've verified that the
customHighlightStyle
is being created correctly and passed to theRichTextEditor
. However, it seems that either the style is not being applied to the underlyingNSTextView
, or there might be an issue with how the highlighting is implemented.Possible Related Code
In the
RichTextView
class, there's ahighlightingStyle
property and asetupHighlightStyle()
method:Question
Is there any additional setup required to ensure the highlighting style is applied correctly? Are there any known issues or limitations with custom highlighting styles in the current version of the package?
Any assistance or insights would be greatly appreciated.