Closed Thread Icon

Topic awaiting preservation: Syntax coloring Pages that link to <a href="https://ozoneasylum.com/backlink?for=8749" title="Pages that link to Topic awaiting preservation: Syntax coloring" rel="nofollow" >Topic awaiting preservation: Syntax coloring\

 
Author Thread
amikael
Bipolar (III) Inmate

From: övik
Insane since: Dec 2002

posted posted 07-10-2003 18:13

Hi, can anyone improve on this? http://www.naltabyte.se/colorsync.htm
I'd like to see a better version, where attributes are colored as well, and it would be even better if it worked for Mozilla as well, and not just IE5x.
Any takers on that challange??

(^-^)b

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 07-10-2003 21:19

That's pretty cool!

That would be a nice addition to the GurusNetwork!

Dracusis
Maniac (V) Inmate

From: Brisbane, Australia
Insane since: Apr 2001

posted posted 07-10-2003 22:33

Using contentEditable="true" means you'll have a really really hard time getting that to work with any other browser appart from IE. Unless you build the whole thing around DOM node manipulation, I doubt you'd be able to do it. I've tried to do this before with IE5.5 and NN6 but it got way to fustrating so I gave up... Although, I knew a lot less about the DOM back then, but I still think it'd be a job and a half. If you want something like this to be cross browser then I'd highly recommend you do it in somehting like Java, Flash or Shockwave -- you'd save yourself a world of headaches. But if you can live with it being IE only then, well, it's already looking quite good. =)

The main reason I wanted to create something like this was so I could hook it up to a back system to allow for live on the fly site editing.

As for syntax highlighting, it's best to have a reference file/list to check against. As it is now, even the tag <poopy panths> highlights, which would give the wrong impression that it's allowd in HTML. If you have a file that listed each tag element and it's allowd attributes, you could offer a greater ammount of control along with being able to highlight non-supported (incorrect) tags/attributes in their own unique way.

Although, it'd also be nice if you could have a preview button that would render the text as HTML in a frame below it or somehting.

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 07-10-2003 22:57

As far as "contentEditable" is concerned and IE only support, I would like to point out that Mozilla starting with version 1.3 does have initial support for "designMode" property and rich text editing. Although designMode is limited to documents only (IFRAMES for example), while contentEditable works with all objects in IE, it's a nice addition to Mozilla...


Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 07-11-2003 03:13

Oh - and don't paste a bunch of text into that. It falls apart!

amikael
Bipolar (III) Inmate

From: övik
Insane since: Dec 2002

posted posted 07-12-2003 01:59

..Unless you enter a break that is...
Why do you think that happens????

(^-^)b

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 07-12-2003 03:18

mr.maX: Welcome back

___________________
Emps

FAQs: Emperor

« BackwardsOnwards »

Show Forum Drop Down Menu