I would be interested in a method for doing attributed text (at least a limited RTF implementation). My research so far says SwiftUI doe not support it. SwiftUI supports a limited formatting with inline hard codes attributes (text. italic, etc).
Ever since SwiftUI came out there have been discussion on this topic around the web. It seems the only viable approach right now is to use UIKit, here is one site: http://www.gfrigerio.com/nsattributedstring-in-swiftui/
In my case, I will start by encapsulating all the text editing in my app and make it plain text only for now. Next year formatting (maybe) will come to SwiftUI text and I can replace that module.
BTW: I am also struggling with another issue that seems like a fundamental feature - drag and drop in SwiftUI lists. Sounds easy, just add and edit button and implement an on move. Well, there is no "EditButton" in MacOS, and if you use multiple outline lists in a NavigationView, I don't understand how to use SwiftUI to allow the drag and drop between the lists.
Second, I can't understand how to implement dragging a file from the desktop or another app into a list. So, I am using a using Swift approach and not SwiftUI for that.
SwiftUI is an outstanding step forward. But, it is having some birthing pains for anyone that wants to use it for a full blown MacOS app with CoreData and iCloud based cooperative editing of attributed text.
I appreciate any suggestions on how to implement any of those features