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