Could the "onclick" command be used in conjuction with an image button to insert the roll into the textarea?
I've been looking at the smilie code and that's what it does. Click a smilie and it inserts something like :smilie: into the text box. Instead of :smilie: I need it to insert the code for a dice roll.
So something like this to create a button (this is just me expressing my idea, it is NOT real code):
Code:
<img src="http://www.mysite.com/dicebutton.gif" onclick="return value('[dice=5]6[/dice]')">
Then I think you'd have to create a little javascript to put in the page head for the onclick command, right? Can anyone help with this? I'm really keen to get it working.