I'm building a small plug-in that has a text editor to edit HTML and CSS code. My problem is that when开发者_JAVA百科 trying to edit the HTML and CSS code from the text area element, I found out that it's not convenient.
For example, the tab button jumps you to the next element instead of inserting a tab. I'm looking for a lightweight script to improve the textarea element. Any ideas?
Unless you are trying to build your own because you
- need specific, custom functionality or
- want to teach yourself how to do it
you should consider something like
http://www.tinymce.com/
I've used this in the past. Works well for tabs.
http://teddevito.com/demos/textarea.html
Beyond that, TinyMCE is fairly standard for more rich-text situations.
精彩评论