How can I add code syntax highlighting in a NSTextView using highlighter.js

399 Views Asked by At

I am trying to do the code syntax color and parsing with highlighter.js so I can render the markdown with my NSTextView.

I am looking for how I can get started with setting up highlighter.js with my NSTextView.

Please see the below picture of what I am trying to recreate.enter image description here

1

There are 1 best solutions below

0
Swift Dev Journal On

Take a look at the Highlightr framework, which uses highlightr.js to provide syntax highlighting in Swift for iOS and Mac apps.