Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: bb buttons
10-08-2008, 04:20 PM #1
- Join Date
- Nov 2006
- Thanked 2 Times in 2 Posts
i have write some bbcode but im struggling on adding the buttons like bold and italic to insert the [ code ] texts... how would i do this?
10-08-2008, 08:11 PM #2
add the button in the template. make it so when you click it checks for selected text in your textarea and then replaces the text with the text wrapped in your tags. if no selected text append it to the bottom of the text area value.
google "js get selected text"... there are tut's to show how to deal with it cross browser.