hlstriker Posted May 9, 2006 Share Posted May 9, 2006 Hello everyone, I am trying to make something like the forums where you are making a thread and there are the Bold, Italic, Underline, Quote, etc buttons that add stuff to the textarea.So far I have my form all ready, but I don't even know where to start to make the buttons interact with the textarea. I figured this would be using PHP too, but i'm not to sure.Here is the code I have so far, and am wondering if someone could change this to make the buttons work with the textarea, and explain what it does.[code]<form name="newssubmit" action="BLAHBLAHBLAH" method="POST"><table border="1" cellspacing="0" cellpadding="5"><tr><td><input type="text" name="title" value="Enter News Title" size="38"></td></tr><tr><td> <input type="submit" name="bold" value="B"> <input type="submit" name="italic" value="i"> <input type="submit" name="underline" value="u"> <input type="submit" name="break" value="Break"> <input type="submit" name="quote" value="Quote"> <input type="submit" name="image" value="Img"> <input type="submit" name="url" value="URL"></td></tr><tr><td> <textarea cols="58" rows="15" name="text"> Enter news here. </textarea></td></tr><tr><td><input type="submit" name="add" value="Add News"><br></td></tr></table></form>[/code]So for example, the user should be able to enter text in the textarea, then highlight the text, push a Bold (or other) button, and it will put the bold html tags around it.Thanks in advance! Quote Link to comment https://forums.phpfreaks.com/topic/9353-make-submit-interact-with-textarea/ Share on other sites More sharing options...
trq Posted May 9, 2006 Share Posted May 9, 2006 This sort of thing is done client side using javascript. Do a google for HTMLarea. Quote Link to comment https://forums.phpfreaks.com/topic/9353-make-submit-interact-with-textarea/#findComment-34481 Share on other sites More sharing options...
hlstriker Posted May 9, 2006 Author Share Posted May 9, 2006 Alright, thanks alot, but what exactly am I supposed to look for there?Sorry, was going around that website wondering what it would be :P Quote Link to comment https://forums.phpfreaks.com/topic/9353-make-submit-interact-with-textarea/#findComment-34483 Share on other sites More sharing options...
AndyB Posted May 9, 2006 Share Posted May 9, 2006 Not sure if HTMLarea is still available for free ... but TinyMCE is free from [a href=\"http://tinymce.moxiecode.com/\" target=\"_blank\"]http://tinymce.moxiecode.com/[/a]. It's a simple javascript textarea editor. Quote Link to comment https://forums.phpfreaks.com/topic/9353-make-submit-interact-with-textarea/#findComment-34488 Share on other sites More sharing options...
trq Posted May 9, 2006 Share Posted May 9, 2006 [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]TinyMCE is free from [a href=\"http://tinymce.moxiecode.com/\" target=\"_blank\"]http://tinymce.moxiecode.com/[/a].[/quote]Ahh.... thats the one I was thinking of anyways. Been so long since Ive done any web work that I'de forgotten what It was called. Quote Link to comment https://forums.phpfreaks.com/topic/9353-make-submit-interact-with-textarea/#findComment-34499 Share on other sites More sharing options...
khendar Posted May 9, 2006 Share Posted May 9, 2006 You could also look into [a href=\"http://www.fckeditor.net/\" target=\"_blank\"]FCKEditor[/a]. Quote Link to comment https://forums.phpfreaks.com/topic/9353-make-submit-interact-with-textarea/#findComment-34528 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.