Unclaimed project
Are you a maintainer of HighlightedTextEditor? Claim this project to take control of your public changelog and roadmap.
Changelog
A SwiftUI view for dynamically highlighting user input
This release adds a new modifier, onSelectionChange. Now whenever the insertion point changes in HighlightedTextEditor, it will run the provided callback.
HighlightedTextEditor(text: $text, highlightRules: .markdown)
.onSelectionChange { (range: NSRange) in
print(range)
}
Thanks to @santi-g-s and @ben-ole for providing the inspiration and assistance for this feature.