Exporting Syntax Highlighted Objective-C as HTML
In pursuit of a good HTML outputted of syntax highlighted obj-c I found: there is no good open source solution.
Scouring the net I discovered however that you can:
- Copy the code straight from Xcode
- Paste into TextEdit (yes TextEdit, that editor you never use. Well here’s a use!)
- Save…
- Select output format of HTML
This works very well: http://methylblue.com/junk/SuProgress.html
Unfortunately the background color is not saved, but that is easy to fix.
NOTE ensure the code you copy from Xcode has no errors, this will ensure it is all syntax highlighted. Otherwise some parts may be the default (white/black) text color.
The HTML that is generated also is split into markup and CSS so you can tweak it if desired.
Written by Max Howell
Related protips
1 Response
Awesome thank you Max!
Are there any easy workflows to quickly grab the HTML code to reduce the number of steps?
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Xcode
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#