Syntax Highlighting Options
rorythecheese
Posted: Thursday, February 28, 2008 12:56:12 PM

Rank: Newbie

Joined: 2/15/2008
Posts: 20
Location: London, England

Hi, Was wondering if there's an easy was to get the admin/developer/xslt source editor to have line numbers and syntax highlighting. Not just xsl but also on the template editor and all the other source editors.

There's some 'codepress' files included, so was thinking it maybe hooked up somewhere but is not turned on currently.

Anyone know how i might get this working.?

Cheeers.
rorythecheese
Posted: Thursday, February 28, 2008 1:05:58 PM

Rank: Newbie

Joined: 2/15/2008
Posts: 20
Location: London, England
:roll:

Actually just found it. for anyone else looking go

/config/umbracoSetting.config

then find the line

<scriptDisableEditor>true</scriptDisableEditor>

and change to

<scriptDisableEditor>false</scriptDisableEditor>

pkoutoul
Posted: Tuesday, March 18, 2008 3:26:42 PM

Rank: Fanatic

Joined: 8/9/2007
Posts: 228
Location: Kentucky, USA
Wow, I just found this and enabled the codepress editor. Very nice.

Which makes me wonder why it is not enabled by default.

Pete Koutoulas • Fayette County Public Schools • Lexington, Kentucky
See you in Chicago at CodeGarden US 2008!
drobar
Posted: Tuesday, March 18, 2008 4:34:15 PM

Rank: Umbracoholic

Joined: 9/8/2006
Posts: 1,410
Location: KY, USA
Hi, Pete,

The codepress editor is very nice indeed. But it has some quirks that didn't get ironed out before v3 went live and that's why it was disabled by default. In particular, pasting into the codepress editor tends to give you a lot of linebreaks.

cheers,
doug.

MVP 2007-2009 - Official Umbraco Trainer for North America - Percipient Studios
mortenbock
Posted: Tuesday, March 18, 2008 4:36:53 PM

Rank: Addict

Joined: 7/19/2006
Posts: 738
Location: Århus, Denmark
pkoutoul wrote:
Which makes me wonder why it is not enabled by default.

It was a bit buggy when v3 was launched so it could suddenly collapse all the code, and a line disapperaed here and there, so they decided to leave it off as default.

And at the same time I think the Codepress project stagnated in development, so a combination of those things...


Morten Bock - Level 2 certified - MVP 2008/2009 - My danish blog with a few english posts

pkoutoul
Posted: Tuesday, March 18, 2008 6:04:41 PM

Rank: Fanatic

Joined: 8/9/2007
Posts: 228
Location: Kentucky, USA
Thanks to Morten and Doug for the replies. I worked with it a while this morning and I see what you mean about the quirks. I think overall I still like it, but it does taking some getting used to. Too bad the project stalled. I found their Web site and sure enough, it looks like there hasn't been an update in 18 months -- an eternity in Internet time!

Pete Koutoulas • Fayette County Public Schools • Lexington, Kentucky
See you in Chicago at CodeGarden US 2008!
psterling@homax
Posted: Wednesday, March 19, 2008 1:49:36 AM

Rank: Aficionado

Joined: 10/30/2007
Posts: 187
Location: Bellingham
One more option to add to the mix is the EditArea editor. Here's a recent post:

Syntax Highlighting in the Umbraco Admin Back end - XSLT, CSS, HTML

-Paul

motusconnect.com :: level-2 certified :: MVP 2008/2009
See you at Codegarden08 US in Chicago!
neehouse
Posted: Wednesday, March 19, 2008 7:46:20 AM

Rank: Umbracoholic

Joined: 7/20/2006
Posts: 1,069
Location: Charleston, West Virginia, United States
Regarding Edit Area, the last I checked, they had ironed out the bugs that was causing issues with .NET, so it should work well at this point. I only had about a dozen bug reports to them after using it for a week.

Let us all know how it goes. It may be worth revisiting again.

• 2007/2008 MVP • 2008/2009 MVP • Core Developer • Certified Professional Level I & II •
pkoutoul
Posted: Wednesday, March 19, 2008 2:29:19 PM

Rank: Fanatic

Joined: 8/9/2007
Posts: 228
Location: Kentucky, USA
Great, I'm gonna try Edit Area. So maybe Niels et. al. should include Edit Area rather than (or in addition to) Codepress in future releases of umbraco.

Pete Koutoulas • Fayette County Public Schools • Lexington, Kentucky
See you in Chicago at CodeGarden US 2008!
imayat12
Posted: Tuesday, April 01, 2008 11:22:11 AM

Rank: Addict

Joined: 7/19/2006
Posts: 593
Location: Preston, UK
psterling@homax wrote:
One more option to add to the mix is the EditArea editor. Here's a recent post:

Syntax Highlighting in the Umbraco Admin Back end - XSLT, CSS, HTML

-Paul


Paul,

After turning this on if you try to add macro in template or insert code in xslt editor you dont get anything. However when you turn it off you do. Dont know if you have come across this?

Regards


Ismail

Level 2 certified. If it aint broke dont fix.
Petr Snobelt
Posted: Tuesday, April 01, 2008 3:46:48 PM
Rank: Aficionado

Joined: 10/2/2007
Posts: 147
Location: Czech Republic
Can be nice if syntax highlighting can be turned on/off by pressing some button in UI
imayat12
Posted: Wednesday, April 02, 2008 8:17:18 AM

Rank: Addict

Joined: 7/19/2006
Posts: 593
Location: Preston, UK
Petr,

The solution Paul has comeup with has a check box to turn on and off in the editor. There is issue though with inserting macro when it is turned on.

Regards

Ismail

Level 2 certified. If it aint broke dont fix.
rorythecheese
Posted: Wednesday, April 02, 2008 11:41:42 AM

Rank: Newbie

Joined: 2/15/2008
Posts: 20
Location: London, England
Yeh neither of these worked properly in the end. The built in codepress one adds a load of lines when you save each file and doesnt keep the structure of stuff when i copy and pasted. And the EditArea one wont let me save when its in the code highlighting mode, but does when the box is unchecked, plus the not working macro insertion.

Hey ismail can you have alook at this post agian, as it's still hidden on the last pages of the extending umbraco forum so i doubt you'd have seen it.

http://forum.umbraco.org/yaf_postst4522_Getting-umbracolibrary-to-associate-with-external-xsl.aspx

Cheerss.
pkoutoul
Posted: Thursday, April 17, 2008 6:58:25 PM

Rank: Fanatic

Joined: 8/9/2007
Posts: 228
Location: Kentucky, USA
I tried EditArea and was loving it until I realized that it was doing the same thing for me -- IOW, I could not save changes made to the script unless I first toggle off the syntax highlighting.

So now we have two alternatives, neither of which quite works right with umbraco. That's a real bummer.

Pete Koutoulas • Fayette County Public Schools • Lexington, Kentucky
See you in Chicago at CodeGarden US 2008!
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.