View Full Version : HTML Text Editor

Aug 17th, 2004, 05:49 PM
Hi there,

I was wondering how I can create a text editor, similar to the one that is used for this forum, when writing a message.

I currently use an iframe, but it seems here they use a textarea, how is that done,...


Aug 17th, 2004, 11:15 PM
Well you have the user type in the textarea and when it's submitted, it's stored in the database. In the textarea, you'll notice that smilies aren't pictures, the font is the text wrapped in some weird tags, same with urls, etc.. this code that is inputted into the textarea is calle BB Code.

When you want to view your message it is no longer displayed in a textarea (as you are viewing, not editing) but just in a regular webpage where the message is now parsed for BB Code, and the message is displayed with the formatting and smilies, etc..

That's how this site works.

If you're looking to make a WYSIWYG HTML Editor, then you're going to need to use an editable iFrame to show the font changes and image entries 'real-time'.

Here are some WYSIWYG HTML Editors:

You can do a search for this site as lots of people have tried to do this exact task, so there's lots of information available. You'd probably want to ask for more help in the Javascript forum.