Artician Home
Join Artician Login Search
Today This Week Mark All as Read Feeds
 

Syntax Highlighting

Artician Beta Tester
User is offline
planck posted May 13 2009, 12:54 AM:
I like sharing code on forums and in my blog.
I would like to do that here on Artician!

But it's difficult when there's no syntax higlighing options...would it be possible to pass an argument in the code tag that says like lang=bash or lang=php?

I think that would be really useful!

--------------------
Sterling Hamilton
Exyst Senior Web Development and Support
http://sterlinghamilton.artician.com
http://www.sterlinghamilton.com
Post 1
Artician Moderator
User is offline
hannesc posted May 14 2009, 07:41 AM:
It would be awesome. I would really love to use this in, say, my blog. I can only imagine though, how much work it must be to implement something like that.

The problem being the amount of languages. Do you limit the amount to only a few? Do you let users submit requests for other languages? How would you implement syntax highlighting for a languages you don't know?

These are all questions that need to be addressed with something like this, but I really do like the suggestion.

--------------------
Post 2
Artician Beta Tester
User is offline
planck posted May 14 2009, 09:37 AM:
I think going with 5-6 basic ones is fine and then a default one.
More importantly - the code tags right now don't implement the PRE tag so the formatting is lost in terms of spacing.
My top picks would be XHTML,CSS,PHP,Bash,VB (which i suppose includes all visual studio languages), and then a default one that just addresses some basic concepts.

There are deffinately tools already available for this - but I am not sure if they can work with artician's custom framework - but I am sure some "reading" of them and some "oh that's a good idea ninja.gif - *copy & paste*" would work

--------------------
Sterling Hamilton
Exyst Senior Web Development and Support
http://sterlinghamilton.artician.com
http://www.sterlinghamilton.com
Post 3
Artician Moderator
User is offline
Sexysev posted May 14 2009, 10:03 PM:
You mean something like this? But different ones for php, css, etc....


CODE
/*Map*/

img {-ms-interpolation-mode:bicubic;}



a#insert_artician, #network_bar, #quick span, a#logout, input#nb_searchField, #puller_strip,

input#nb_searchButton, a#nb_searchMore, #quick a:hover, #quick a.active,

#user_pages, div#navtabs ul em, .quick, .quick .left, .quick .right, input.field, input.field_default, select

{background-image: url(../images/layout/network_bar/nb_mapv3.gif); background-repeat:no-repeat;}

--------------------
Adrian Balkwill | Artician Staff | Graphic Designer / Network Technician | www.blogfullbliss.com
Post 4
Artician Beta Tester
User is offline
planck posted May 14 2009, 10:15 PM:
QUOTE(Sexysev @ May 15 2009, 03:03 AM) *

You mean something like this? But different ones for php, css, etc....
CODE
/*Map*/

img {-ms-interpolation-mode:bicubic;}
a#insert_artician, #network_bar, #quick span, a#logout, input#nb_searchField, #puller_strip,

input#nb_searchButton, a#nb_searchMore, #quick a:hover, #quick a.active,

#user_pages, div#navtabs ul em, .quick, .quick .left, .quick .right, input.field, input.field_default, select

{background-image: url(../images/layout/network_bar/nb_mapv3.gif); background-repeat:no-repeat;}



I see that it's in code tags...but there's no syntax hilighing or spacing (indentation)....maybe I missed the point of the post...

--------------------
Sterling Hamilton
Exyst Senior Web Development and Support
http://sterlinghamilton.artician.com
http://www.sterlinghamilton.com
Post 5
Artician Moderator
User is offline
Sexysev posted May 15 2009, 11:37 AM:
No I know what you mean. The code tags are a start. tongue.gif

--------------------
Adrian Balkwill | Artician Staff | Graphic Designer / Network Technician | www.blogfullbliss.com
Post 6
Artician Developer
User is offline
Eric posted May 26 2009, 07:18 PM:
Heh, it's not as simply as copy and paste, but I wish it was. We will put it on our to-do list but it's low priority. Thanks for the suggestion though.

--------------------
Artician Developer Management
Post 7
 
« Previous Topic Next Topic »

Topic Tags: None Description: Who's Reading: 2 User(s) 0 Members:

Browse Without Ads!