key-words highlight in <textarea> (again)

Posted by Halst on Stack Overflow See other posts from Stack Overflow or by Halst
Published on 2010-04-05T18:26:09Z Indexed on 2010/04/05 18:33 UTC
Read the original article Hit count: 256

Filed under:
|
|

Wait, I know! I know that this "syntax highlight in textarea"-question was raised like a million times on stackoverflow! But, please, listen.

offtopic: I'm not a web-developer, and technically I'm not a programmer at all. I study mechatronics and deal mostly with control-engineering and digital-hardware. And I'm so pissed off that whenever I want to share some application (that would be helpful in my field) and embed it into the web, I need to know such a crazy amount of technologies, like html, css, javascript, flash, etc.. that takes time, which I could have been spending for the benefit of my own field.

Right now I'm playing with hardware-description-languages and I'm writing some Python-libraries to convert one HDL into another. And I wanted to embed such feature on the web: http://xhdl2vhdl.appspot.com/

I wanted to implement some basic syntax highlighting (only keywords highlighting will be enough) so that the code could be readable. But the whole idea highlighting something in textarea is not trivial at all. The other difficulty is that the languages I work with are rare, and there are no out-of-box solutions for them.

I tried to dig into these solutions, but they are very complicated for me: http://www.nicolarizzo.com/gamesroom/experimental/CodeEditor.html http://marijn.haverbeke.nl/codemirror/jstest.html

and there is no clear descriptions how to use them (for my level of knowledge of web-development).

So, is there a simple solution, just to highlight a bunch of key-words in textarea or perform something equivalent?

Thank you.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about AJAX