HTML editor in Javascript - TechRepublic
General discussion
July 18, 2002 at 04:45 AM
bsonnich

HTML editor in Javascript

by bsonnich . Updated 23 years, 11 months ago

I’m making a basic HTML editor in Javascript… or atleast trying to. I can’t figure out the function that will do this:

1. They click in the textarea where they would like to insert the “

” tag.
2. They click the “New Paragraph” button
3. The function inserts the “

” tag in that spot.

I’ve gotten it to append to the end, but I can’t get it exactly where I want it. Is there any way to split the value of the textarea based on where the cursor is?

Any help would be appreciated. Thanks.

Brendan

This discussion is locked

All Comments