4/23/2023 0 Comments Imple text editor for mac![]() ![]() Should be instantiated once for performance. Patterns and formatting for those patterns It should not be recreated every time the view is redrawn. Notice the NSRegularExpression is instantiated once. HighlightedTextEditor( text: $text, highlightRules: rules) HighlightRule( pattern: boldItalics, formattingRules: [ Struct ContentView: View private var text : String = "here is _bold emphasis text_ " private let rules : = [ Import HighlightedTextEditor // highlights text between underscores let boldItalics = try ! NSRegularExpression( pattern: "_+_ ", options: )
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |