Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-05-18 18:17:48

Ace of Dubs
Member
Registered: 2006-04-17
Posts: 446

Colored code for TxP Admin

I have seen countless examples of people styling the code on their websites, but how hard would it be to have color coding within TxP itself? Right now I suppose its not that big a deal as I am currently copying and pasting between TxP and GoLive, but it would be neat to have some basic xhtml/css syntax recognition inside textpattern, especially for wacked out folks like myself who tend to spill out CSS definitions out on one line for easy tweakage. It’s amazing how useless I am without the pretty colors highlighting my attributes and values!

Offline

#2 2006-05-19 02:28:34

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Colored code for TxP Admin

…how hard would it be to have color coding within TxP itself?

It’s not possible to do that within an HTML textarea. You could potentially fake it using frames and fancy JavaScript (scripts like TinyMCE do that to render HTML for you as you type), but that’s easier said than done (which is why TinyMCE, FCKEditor, etc are such huge projects all by themselves).

That doesn’t mean it wouldn’t ever happen – I’ll try my hand at this and see what comes from it – but it’s a lot of work and testing and wouldn’t happen overnight. :)

Offline

#3 2006-05-20 21:54:10

Ace of Dubs
Member
Registered: 2006-04-17
Posts: 446

Re: Colored code for TxP Admin

Agh, if its that much trouble, dont kill yourself Mary. There are probably much more important things worthy of your attention, (namely improving image handling in the next version of TxP.)

Anxiously awaiting the release of 4.1….

Ace

Offline

#4 2006-05-20 22:52:07

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: Colored code for TxP Admin

The best way to overcome this, is to edit css , html and form templates in a decent external editor.(Not Golive)
The syntax highlighting, folding pattern and Indent marking though for Textpattern Tags at least, must be customized first and the only reasonable way to do this that I can think of, is TextMate, this can take a considerable amout of time though,
(A lot of regular expressions and fancy p.list files for the language Grammar)

regards, marios

Last edited by marios (2006-05-20 22:55:56)


⌃ ⇧ < ⌃ ⇧ >

Offline

#5 2006-05-21 16:38:46

Ace of Dubs
Member
Registered: 2006-04-17
Posts: 446

Re: Colored code for TxP Admin

Interesting Mario

I have been using Textmate for a few weeks now and have been too lazy to enter in my own snippets as GoLive does a great job of autocomplete (I only program xhtml/css for now) I will have to look into this suggestion of yours as I really do enjoy the workflow in TxM and am taking up Ruby and PHP in my spare time.

cheers

Offline

#6 2006-05-21 21:16:00

Ace of Dubs
Member
Registered: 2006-04-17
Posts: 446

Re: Colored code for TxP Admin

Been doing some tinkering and snippets are pretty cool. But not nearly as fast as GoLive’s (or Dreamweaver’s) autocomplete. Perhaps it’s just a matter of getting accustomed, but I see the lack of syntax-aware completion to be a major disadvantage.

Offline

#7 2006-05-21 22:50:12

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Colored code for TxP Admin

A more useful Textpatter feature might be to provide a syntax checking and/or highlighting view (as opposed to editor) for page templates.

Last edited by zem (2006-05-21 22:52:53)


Alex

Offline

#8 2006-05-23 10:21:47

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: Colored code for TxP Admin

Trying to shoehorn together a language grammar for TXP, not at a reasonable stage yet.
Those plist files are quite peculiar, trying with text.html.txp scope, but I get a lot of Interference problems with html.
Hilighting view is no problem, folding start and stop markers working partly.
(Syntax check is of course out of question for this attempt, at leat for now)

regards

Last edited by marios (2006-05-23 10:27:23)


⌃ ⇧ < ⌃ ⇧ >

Offline

#9 2006-05-23 12:18:22

Ace of Dubs
Member
Registered: 2006-04-17
Posts: 446

Re: Colored code for TxP Admin

Maybe not reasonable, but not bad considering you got the highlighting view and folding markers in place… certainly you have gone farther than I would have.

Just remember when things get rough, sometimes the best solution is to take a walk or even a power nap to recharge the brain and give the eyes a rest. In fact I think I will do just that right now…

Last edited by Ace of Dubs (2006-05-23 12:20:07)

Offline

#10 2006-05-23 19:16:45

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: Colored code for TxP Admin

I’ll keep you informed about the progress. I just love TM , because it gives me all the power and flexibility I need, right under my fingertips.

regards, marios

Last edited by marios (2006-05-23 19:20:59)


⌃ ⇧ < ⌃ ⇧ >

Offline

#11 2006-05-26 18:43:41

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: Colored code for TxP Admin

Everything is going well with the TXP Language Grammer bundle for TM, this will be nice , and soon enough, we can share and exchange our bundle items.

More time is needed though.

(Articles and tutorials are on the way eventually)

regards, marios

Last edited by marios (2006-05-26 18:45:39)


⌃ ⇧ < ⌃ ⇧ >

Offline

#12 2006-05-26 19:57:16

Ace of Dubs
Member
Registered: 2006-04-17
Posts: 446

Re: Colored code for TxP Admin

Update: I wrote to MacroMates and they said that syntax awareness would not be out anytime soon. What a shame!

To Marios:

No rush at all. Hopefully I will be fluent with TM snippets by the time you finish the bundle.

Offline

Board footer

Powered by FluxBB