You can guess that it's still a dark world to me.
Here is what I am trying to do.
I have a textarea and a little image (the common 'B' for Bold). I would like, as the title of this thread suggests, that when I click on the image, the highlighted texts become surrounded by these two custom bbCode: [ b ]text highlighted[ /b ] (extra spaces have been added so that vbulletin does not actually interpret the bbcode ).
Is that hard to achieve? Would someone show me how to do this?
That would be really nice.
Here is my actual code (just the fundations of the page). You will find the gif in question in the attachement part of this thread. I am looking forward to learning how to do this.
thanks in advance for your help
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<title>playing with the textarea</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<form name="replace" id="replace" action="" method="">
<img height=20 alt=Bold src="bold.gif" width=21>
<textarea name="test" rows="20" cols="35"></textarea>
<input type="submit" value="Submit" />