The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Syntax highlighting for textarea via greasemonkey or similar Reply To: Syntax highlighting for textarea via greasemonkey or similar


Hi everyone.

Thanks for this interesting post. Did you finally manage to make it work? I am facing the same kind of challenge.

I am new to GreaseMonkey and CodeMirror and really love the potential of both frameworks. Now I don’t have that much experience and mostly don’t know how to debug it, so it’s pretty complicated to develop a working script.

What I want to achieve is the following:
– I have an existing website that features wiki pages edition in The code is not formatted and it is challenging to develop on for HTML newbies.
– The wiki page HTML code edition takes places in a specific textarea, that I know the ID of (using Firebug it was pretty easy to find).
– I started from Kaskus’ Userscript ( to create a CodeMirror textarea from the HTML code text area, with no success.

I have been struggling with this for already 4 hours and would really appreciate any help. I can provide the code if needed, so if you can point me to what I am doing wrong, or tell me how I can troubleshoot/debug it, I would be very grateful.

Thanks a lot in advance!