jquery textarea custom tags replacement

Posted by Tim on Stack Overflow See other posts from Stack Overflow or by Tim
Published on 2011-02-28T17:06:21Z Indexed on 2011/02/28 23:25 UTC
Read the original article Hit count: 208

Hi all, I'm basically trying to create my own tags - and replace them with the right HTML tags. So {B} {/B} would turn into <b> </b>

I have only got so far with this, here: http://www.nacremedia.com/text2.htm

Use the [B] button to bold stuff the current selection... it creates two bold tags and one closing for some reason.

I'm so close! But I just need a bit of direction to get the final bugs out - can anyone please help??

Also, if there is a better way of doing this altogether then I am more than welcome to new ideas.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about regex