Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prettify code inside a textarea

Tags:

javascript

i have found this project

http://code.google.com/p/google-code-prettify/

i've tested it and it works fine

but it only works with (<pre>)

i want use it with (<textarea>)

but if i replace <pre> to <textarea>

it's not working !!

So how to use this script with textarea?

like image 739
Alaa Gamal Avatar asked Aug 01 '12 20:08

Alaa Gamal


1 Answers

Have you tried codemirror?

It does what you want: prettify code in textarea.

like image 65
Prasanth Avatar answered Oct 26 '22 00:10

Prasanth