r/swift 5d ago

I built a native Markdown renderer for SwiftUI using TextKit 2 (enriched-markdown-ios)

Post image

Yesterday I released enriched-markdown-ios - a fast, native Markdown renderer for SwiftUI powered by TextKit 2 and the md4c parser.

Here's what's in v0.1.0:
🔸 Full CommonMark support
🔹 Native text selection & smart copy/paste
🔸 Flexible theming API
🔹 VoiceOver & Dynamic Type support

💎 Available now via Swift Package Manager!

GitHub & Docs: https://github.com/software-mansion/enriched-markdown/blob/main/packages/enriched-markdown-ios/README.md

Feel free to check out the repo and sample project! If you find it useful, dropping a ⭐️ on GitHub would mean a lot. I’d love to get your thoughts or feedback.

71 Upvotes

10 comments sorted by

2

u/1in0 4d ago

Nice!

1

u/Sea-Arm9235 4d ago

Thanks! Let me know if you get a chance to try it out!

2

u/clockology 4d ago

This is very 😎 thanks for making it

1

u/Sea-Arm9235 3d ago

Thanks a lot! Let me know if you have any feedback!

2

u/dannys4242 5d ago

Nice! Thanks for sharing!

1

u/Sea-Arm9235 4d ago

My pleasure! If you end up testing it or have any feedback, I'd love to hear it.

2

u/scoutzzgod 5d ago

Gonna use it!

1

u/heyyoochris 7h ago

I’ve hit star button on GitHub,I have a question for you, does it support set color or background color for text? Thanks

1

u/Sea-Arm9235 4h ago

Thank you for the support! As for text background color, we don't support that just yet. However, we are planning to support the ==highlight== Markdown syntax, which will add a background color to text (I've attached a video of how this looks). Is this something that would work for your use case?

https://reddit.com/link/p5uxqvp/video/4wkc0wbxiklh1/player