cha0sriderx Posted August 17, 2007 Share Posted August 17, 2007 i was wondering if someone could help me, i was wanting to know where i can find out how to make buttons like the ones above the textarea when u make a topic or reply. the one that says bold, italics, etc. i know how to add the text at the end of the edit box but i wanted to know how to add it where the cursor is or around the selected text. Link to comment https://forums.phpfreaks.com/topic/65357-form-issue/ Share on other sites More sharing options...
cha0sriderx Posted August 17, 2007 Author Share Posted August 17, 2007 i was wondering if someone could help me, i was wanting to know where i can find out how to make buttons like the ones above the textarea when u make a topic or reply. the one that says bold, italics, etc. i know how to add the text at the end of the textarea but i wanted to know how to add it where the cursor is or around the selected text. --sorry for the double post, i hit quote by accident instead of modify. Link to comment https://forums.phpfreaks.com/topic/65357-form-issue/#findComment-326371 Share on other sites More sharing options...
AndyB Posted August 17, 2007 Share Posted August 17, 2007 http://tinymce.moxiecode.com/ - does that help? Link to comment https://forums.phpfreaks.com/topic/65357-form-issue/#findComment-326372 Share on other sites More sharing options...
cha0sriderx Posted August 18, 2007 Author Share Posted August 18, 2007 i dont need a WYSIWYG editor, i mean when u click on Bold it puts the [ b ][ /b ] in the textarea where u are replying, and if u have sometime selected it puts it around the text. i was wonder if someone knew how to do that. Link to comment https://forums.phpfreaks.com/topic/65357-form-issue/#findComment-327698 Share on other sites More sharing options...
marcus Posted August 18, 2007 Share Posted August 18, 2007 That's javascript. <script language="Javascript"> function addBold(){ form.textarea.value += "[b]Your text here[/b]" } </script> <form name="form"><input type="button" value="Bold" onClick="addBold()"><br> <textarea name="textarea" cols="30" rows="14"></textarea><br><input type="submit"> </form> Link to comment https://forums.phpfreaks.com/topic/65357-form-issue/#findComment-327708 Share on other sites More sharing options...
cha0sriderx Posted August 19, 2007 Author Share Posted August 19, 2007 That's javascript. <script language="Javascript"> function addBold(){ form.textarea.value += "[b]Your text here[/b]" } </script> <form name="form"><input type="button" value="Bold" onClick="addBold()"><br> <textarea name="textarea" cols="30" rows="14"></textarea><br><input type="submit"> </form> well i know how to add it to the end of the textarea, i want it so that it will add it where the cursor is or around text if its highlighted. Link to comment https://forums.phpfreaks.com/topic/65357-form-issue/#findComment-327883 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.