Way to highlight code in textarea with jquery?

Martti Laine picture Martti Laine · Jul 21, 2010 · Viewed 13.9k times · Source

Is there any good and logical ways to highlight code inside textarea via jQuery? If there is, please share.

Answer

garpo picture garpo · Apr 25, 2011

You could use CodeMirror http://codemirror.net/

...a versatile text editor implemented in JavaScript for the browser. It is specialized for editing code, and comes with a number of language modes and addons that implement more advanced editing functionality.

A rich programming API and a CSS theming system are available for customizing CodeMirror to fit your application, and extending it with new functionality...