views:

63

answers:

2

Is there a way to give CSS syntax highlighting to any <textarea> using any bookmarklets or favlets? I work on a CMS where I write and manage CSS in a plain <textarea> like Notepad. Is there a boomarklet to enable CSS syntax highlight in specific <textarea> temporarily?

Should work in IE.

+1  A: 

I don't know about mookmarklets or Favlets, but you could write a userscript to do that.

Not sure if IE supports anything like that, but Firefox, Chrome and Opera all support userscripts. (Use Greasemonkey for Firefox)

For example, I wrote this script for myself, to highlight code on the Bytes forums, which I can use in all three browsers. (Feel free to use that if you want.)

Edit. It seems the IE7pro addon for IE supports Greasemonkey-like userscripts.

Atli
but i think ur script not for CSS
metal-gear-solid
My script does not specifically highlight CSS, no. But it would not take much to add that. And you would have to edit it anyways, to get it to highlight `<textarea>` boxes rather than the `<ul>` boxes I target.
Atli
"I don't know about mookmarklets or Favlets" You will found many bookmarklets here http://www.webresourcesdepot.com/15-must-have-bookmarklets-for-web-designers-and-developers/
metal-gear-solid
and here is how to make http://betterexplained.com/articles/how-to-make-a-bookmarklet-for-your-web-application/
metal-gear-solid
I want to do with bookmarklets only because i can't install IE7 pro.
metal-gear-solid
A: 

If you know how to write a bookmarklet, you may be able to adapt Code Mirror.

VirtuosiMedia