tags:

views:

90

answers:

1

I want to make it so that if the user has "bold text" highlighted in a text area when they press the "Bold" button it replaces it with "[b]bold text[/b]".

I would think that it would by placing "[b]" before the start of the highlighting and "[/b]" after it.

I already have it so that the when the bold link is pressed it appends "[b]STRING[/b]" to the end of the text area.

the text area is stored in the variable "tbbcearea" so I can call methods on it.

A: 

I found this:

http://cfsilence.com/blog/client/index.cfm/2009/7/31/RetrieveReplace-Selected-Text-With-jQuery

this is exactly what i wanted to do

Arcath