kyle-n / HighlightedTextEditor

A SwiftUI view for dynamically highlighting user input
MIT License
726 stars 69 forks source link

onSelectionChange modifier #33

Closed kyle-n closed 3 years ago

kyle-n commented 3 years ago

Adds new modifier to AppKit/UIKit editors to call a callback on selection change. AppKit editor filters duplicates because whatever SwiftUI for macOS is doing causes the selection to change multiple times when you type a key in the editor.