English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

There are many online HTML editors (ie. www.FreeTextBox.com). Can someone please explain to me how exactly they go about achieving text input and applying different styles to any portion of the typed text? That is, are they simply using a TEXTAREA and when the user clicks to have BOLD they are identifying the selected region and wrapping a element around the text?

Again Im interested in how they are able to achieve live text input like a textbox/textarea and are able to apply styles to each and every character to it.

Thanks

2007-01-05 01:26:40 · 2 answers · asked by zerohourx 1 in Computers & Internet Programming & Design

2 answers

The text editor is enhanced with javascript (turn off javascript and no HTML editor for you).

So, yes, the basis for such an editor is a text area. When the user clicks bold, the region is wrapped in a B element, but javascript renders the text as HTML.

If you're really interested in going into the workings of such editors, take a look at the code for FCKEditor (http://www.fckeditor.net/ ) and TinyMCE (http://tinymce.moxiecode.com/ ).

2007-01-05 01:33:49 · answer #1 · answered by csanon 6 · 0 0

http://w3schools.org explains it all for free. also:
http://w3.org

2007-01-05 09:29:29 · answer #2 · answered by Anonymous · 0 2

fedest.com, questions and answers