kevinritt Posted January 29, 2009 Share Posted January 29, 2009 Hi, On this page http://www.lynnarts.org/about_us/calendar2.php?action=editcalendar_content&edit=edit&calendarId=1 I am trying to have the abilty to edit text but when I try to underline or make the text bold - it doesn't work. Any ideas? I want to be able to use this text editor for different pages - is this possible? I have these 2 functions written: function ValidateOutput($value) { $BBCode = array( " [center]" => "<center>", "[/center] " => "</center>", "[b]" => "<b>", "[/b]" => "</b>", "[u]" => "<u>", "[/u]" => "</u>", "[i]" => "<i>", "[/i]" => "</i>", "[*]" => "<li>", "" => "</li>", ); $value = str_replace(array_keys($BBCode), array_values($BBCode), $value); $value = stripslashes(nl2br($value)); return $value; } function buttons() { $buttons = '<input type="button" value="Bold" onclick="bbcode(\'[b]\', \'[/b]\')" /> <input type="button" value="Italic" onclick="bbcode(\'[i]\', \'[/i]\')" /> <input type="button" value="Underline" onclick="bbcode(\'[u]\', \'[/u]\')" /> <input type="button" value="List Item" onclick="bbcode(\'[*]\', \'\')" />'; return($buttons); } which are used in the php page: <tr> <td align="center">'.buttons().'<br /><textarea name="calendar_content" cols="85" rows="35">'.$calendar_content.'</textarea></td> </tr> Also - how do I add more features to the text editor (font color, size, etc)? Thank you Link to comment https://forums.phpfreaks.com/topic/142922-text-editor-bbcode-problem/ Share on other sites More sharing options...
kevinritt Posted January 29, 2009 Author Share Posted January 29, 2009 Is there something else I could use instead of the bbcode? What do others use? Suggestions? Link to comment https://forums.phpfreaks.com/topic/142922-text-editor-bbcode-problem/#findComment-749947 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.