Displaying code on a website/blog can be a real pain in the butt. Some of you may have noticed that I sometimes used pastebin to display sections as a last resort. I have now discovered dillinger.io which solves this problem for us.
Paste the raw code you want in the left hand pane.
Click the "show html" under utilities menu.
Copy and paste the text shown into your blog/website.
You may still want to apply css rules to pre or code tags to make it look nice. But at least all the characters will be shown as you intended on the front end.
No comments:
Post a Comment