d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Embedding / Displaying Source Code
Add Reply New Topic New Poll
Member
Posts: 1,358
Joined: Dec 30 2012
Gold: 0.10
Oct 10 2014 07:13pm
Anyone know of a library for displaying / indenting source code on a web page similar to the one used on this forum? Looking for one thats got more features however, such as line numbers, etc

My brain is dysfunctional today. I can't find much on google.

This post was edited by SelfTaught on Oct 10 2014 07:15pm
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Oct 10 2014 07:20pm
have you tried pastebin or ideone?

you can also try something like jsfiddle for javascript/html/css
Member
Posts: 1,358
Joined: Dec 30 2012
Gold: 0.10
Oct 10 2014 07:26pm
Quote (carteblanche @ Oct 10 2014 05:20pm)
have you tried pastebin or ideone?

you can also try something like jsfiddle for javascript/html/css


yeah, i'm looking for a syntax highlighter similar to the one used on pastebin. i intend to implement it on my own personal site im throwing together though.
Member
Posts: 11,610
Joined: Oct 28 2008
Gold: 1,795.00
Retired Moderator
Posts: 18,570
Joined: Feb 27 2004
Gold: 11,858.00
Trader: Trusted
Oct 13 2014 08:38am
Check out PrismJS.

I don't think it will do line numbers, but that feature may be something you can add or look through Prism's site and see if they have an option or plugin for.

There is a Line Number plugin for it.

PrismJS: http://prismjs.com/
Plugins: http://prismjs.com/plugins/line-numbers/

This post was edited by Blind[zF] on Oct 13 2014 08:41am
Member
Posts: 1,358
Joined: Dec 30 2012
Gold: 0.10
Oct 13 2014 09:00am
Quote (Blind[zF] @ Oct 13 2014 06:38am)
Check out PrismJS.

I don't think it will do line numbers, but that feature may be something you can add or look through Prism's site and see if they have an option or plugin for.

There is a Line Number plugin for it.

PrismJS: http://prismjs.com/
Plugins: http://prismjs.com/plugins/line-numbers/



I'll look into it some more but that looks like exactly what I need, ty :)

Member
Posts: 9,912
Joined: Mar 23 2008
Gold: 459,027.00
Oct 23 2014 04:29am
:thumbsup:
Member
Posts: 1,358
Joined: Dec 30 2012
Gold: 0.10
Oct 23 2014 12:24pm
Quote (partyplanner @ Oct 23 2014 02:29am)
:thumbsup:


:huh:
Member
Posts: 3,005
Joined: May 31 2013
Gold: 151.89
Oct 23 2014 11:03pm
Wow u guys smartt
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll