The AniDB Rich Text Editor
This page will try to explain the AniDB RTE and why it isn't your standard Rich Text Editor.
What is an RTE
A Rich Text Editor is a User Interface control that replaces a standard HTML textarea element; it allows for the rich formatting of text content, including common structural treatments like lists, formatting treatments like bold and italic text, these formatting options are applied live so that you can get an immediate feeling of what you are doing, much like what you get when using a word processing application like MS Word, Open Office Writer, etc.
How does an RTE work
An RTE is usually an html document within an iframe with the contentEditable attribute enabled which allows for the editing of the document in your browser, there is then a set of basic commands for doing basic commands, these basic commands are done via the document.execCommand command, stuff like bold, italic and so on are applied with this command, execCommand also has another functions to control how an RTE works.
The RTE interface was developed by microsoft and ported to other browsers by their respective vendors, much like the xmlhttprequest function that is core of AJAX.
The problem is that vendors more or less follow specifications standards with some not respecting execCommands which control how the editor works. This makes coding an rte a very complicated issue if one intends to support multiple browsers with lots of hacked in code to support/work-around browser quirks.