Closed moophis closed 1 year ago
Hi @moophis,
MarkdownUI renders content to a SwiftUI view. It could render an AttributedString
at the cost of losing the styling and other capabilities. Additionally, it will be a daunting task to do this.
A new API on macOS 13 / iOS 16 allows rendering a SwiftUI view to a PDF, which may be helpful for your use case. See this post for more info: https://www.hackingwithswift.com/quick-start/swiftui/how-to-render-a-swiftui-view-to-a-pdf.
If you have further feature requests or questions, please use the discussions, so that others can participate and have visibility. Issues should be used exclusively for reporting bugs. Thanks for understanding 🙂.
If anyone found a good practical solution to this that'd be great - I can use another lib but then the rendering decisions might be different
Hi, thanks for making this excellent library that my apps heavily rely on!
Is it possible to expose helper functions that transform the raw markdown string into an
NSAttributedString
/AttributedString
which contains the styles used for the correspondingMarkdown
view?My use case is to dump some markdown texts into a PDF file. Currently, the PDF generation library I'm using can accept
NSAttributedString
type to format the text content. Ideally, I'd like to keep the same UI style as if they are rendered in my app.Thanks in advance!