prudens Posted March 2, 2008 Share Posted March 2, 2008 Hey, I want to create a very simple text editor where I can just copy and paste my WORD/RICHTEXT documents and save to mySQL. Is there anyway to preserve the format in mySQL? Thanks, Link to comment https://forums.phpfreaks.com/topic/93968-richtext-and-mysql/ Share on other sites More sharing options...
s0c0 Posted March 2, 2008 Share Posted March 2, 2008 Don't re-invent the wheel. Take your pick between TinyMCE or fckEditor. Just google these two web-based WYSIWYG editors and you're done. You will want to wrap the posted data in addslashes(). When returning it, you will want to stripslashes(). Link to comment https://forums.phpfreaks.com/topic/93968-richtext-and-mysql/#findComment-481495 Share on other sites More sharing options...
trq Posted March 2, 2008 Share Posted March 2, 2008 When returning it, you will want to stripslashes(). You don't run data coming from the database through stripslashes()> Even if the data is stored using addslashes(), the data itself is not stored with the slashes in it. Addslashes() attempts to escape chars that will break your sql query, thats all. Its also prefered to use mysql_real_escape_string() these days. Link to comment https://forums.phpfreaks.com/topic/93968-richtext-and-mysql/#findComment-481499 Share on other sites More sharing options...
prudens Posted March 2, 2008 Author Share Posted March 2, 2008 ??? uh... so what do I do? sorry I'm new to this heh heh. Link to comment https://forums.phpfreaks.com/topic/93968-richtext-and-mysql/#findComment-481606 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.