Very often, in web projects you need to use a visual code editor ( richtext code editor ), similar to existing IDEs, with line numbers and code highlighting. It is most often used in editing the source code of an article or templates in the admin panel. In this article I will list the existing scripts by analogy with the list of WYSIWYG editors. Virtually all existing visual editors create an iframe and generate inside the page in accordance with the data of the javascript object, which deals with all the tasks of generating code and processing keys. Based on iframe:
EditArea is the most popular editor due to tabulation, gzip, namespace compatibility with other libraries.
CodePress - parsing SQL, Perl, C #, XSL, ASP, VBscript. Separate engines for different browsers (gecko = firefox, ie, opera). It is created iframe with internal CodePress'object with access via contentWindow. Immediately inside the script, the textarea elements are searched for the class, so with dynamic ajax editors you will have to change the script. In addition, the numbering (up to 1500) lines made with a single image
Let me remind you that iframe does not meet the XHTML specification, but to use The proposed object tag is not very successful, due to the restriction on access internal dom elements (correct if i'm wrong). Based on divs
MDK-editor is the most normal editor, there is a context menu. The disadvantages include ugly skin, slight stagnation and unknown license to use.
Helene - instead of the iframe, the background div and dynamically positioned textarea are used on top. Since only one row changes, it is impossible to select several lines at once.
9ne - similar to the console, but there is no possibility of selecting the entire line Shift + End. Emulates the caret with a flashing div.
Ps. Announce that in a short time there will be a blog engine of my production ...