I'm calling for aid because... well I'm lazy and tired of this now.
I'd like, to select text in an <textarea> and by using a greasemonkey script add the functionality that phpbb's tag-buttons.I've tried various of functions as window.getSelection().toString(); and similiar without result. Would post code, but I don't have it here.
That should be easy:
[js] unsafeWindow.bbfontstyle('[bb]','[/bb]'); [/js]
This will work on phpbb forums (this one for example) because they provide such a function.
JAM wrote:getElementsByClassName Is a Firefox 3 feature tho. But nevermind, I'll mess around with it.
Yeah, I must have forgotten about that because I use ff3 for over a month already (and recommend it to everyone for performance reasons. Eats less memory too).