Refactor: Use `Text` with `AttributedString` instead of custom `AttributedTextView`

#112 · open · 1 comments

View on GitHub ↗

glasfisch3000

When displaying messages, `FormattedBodyView` currently uses the custom `AttributedTextView`, which displays a `NSAttributedString` using `NSTextView`. I think this could be done more easily with SwiftUI's `Text` and `AttributedString`. This would fix #103. It might even be possible to replace the custom markdown stuff with `AttributedString`'s own markdown parsing.

Comments

viktorstrate

I originally used AttributedString with the `Text(markdown:)` view, but with the custom AppKit timeline I switched to NSAttributedString because it allowed for more customization. See PR #67 where this was changed.