Jump to content

Bold/Italic/Underline buttons for text field.


ShootingBlanks

Recommended Posts

How would I go about making buttons (much like the ones above where you type posts/replies on this or any other message board) that would insert HTML code for:

<b>, <i>, <u>

etc, wherever the user's cursor is at within the text field?...

 

Is that even PHP?  Or another web technology all together?

 

Thanks!!!

 

That would be JavaScript. You would have to create a function to add the text when clicked, then on the image they click, put an onClick function. If I could help you more, I would...I would post this in the JavaScript forum though, you will get much more help.

You can try using what I have....i got it from other sites and got most of it working

Thanks, AdRock...

 

...both "editor.htm" and "editor2.htm" don't seem to work when opened in a browser (nothing happens when you click the tag buttons).  Are they supposed to work?  I just want to make sure that I'm looking at the right thing before I start picking apart this code.  Thanks!

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.