I'm trying to build a markdown editor in macOS and I found this package: https://github.com/kyle-n/HighlightedTextEditor
However, the one thing I would like to extend is the possibility to have markdown characters removed.
E.g when typng **bold**
, it should dynamically render the bold text but without the asterisks. I assume I need to use a NSLayoutManager
but not sure how to proceed. I'm quite new to Swift development and I tried following along the Text kit guides on WWDC but it kinda flew over my head. Any pointers on how to start?
Just to clarify: it should work for user input, so it needs to work for TextField, not Text alone
I found another post Hide Markdown Characters with NSLayoutManager in Swift but I can't wrap my head around how to implement the glyphRange functionality