Page 1 of 1

Bold, Italic and underline buttons

Posted: Tue Jun 28, 2005 7:27 pm
by Jim_Bo
Hi,

I have been making a forum, and am wanting to add bold, italic and underline buttons like found in forums to format the text etc .. Whats the easyist way to go about it.


Thanks

Posted: Tue Jun 28, 2005 7:34 pm
by neophyte
Options Borrow phpbb's js open source system. (Just look at the source)

Write your own.

Find another -- Do a search for bbcode editor.

Posted: Wed Jun 29, 2005 3:33 am
by s.dot
What I did for my forums is make a bold, italic, and underline button, when clicked triggers a function to insert [ b ] (example) into the text field. Then I used str_replace to replace all [ b ] 's to <B>.. etc

Posted: Wed Jun 29, 2005 4:06 am
by Jim_Bo
Hi,

I managed to find this:

http://www.iceteks.com/articles.php/javascript/1

It works but you need push bold to get [.b]then type the message, press bold again to close the message[./b]

Anyone know of other code that lets you highlight the code hit bold and have it add the tags to both ends of the text.

Cheers

Posted: Thu Jun 30, 2005 4:01 am
by Jim_Bo
Hi,

Any other suggestions or help ?

Cheers