Click to See Complete Forum and Search --> : Editor in the form
ramwaimea
11-10-2006, 10:38 AM
I want to incorporate editor in the HTML form. When the users enter the description they can choose the font type, size and color. They can also use Bold, italic, underlined letters. Sounds familiar? Just like when you use "Post new thread" form in webdeveloper.com.
I noticed that form editor in webdeveloper.com is not very sophisticated. It just adds the tags when you click on "Bold", "Italic", etc., But, some sites actually change the text color, size, etc., without adding any tags. It is just like typing in MS Word. How is this done?
Thanks
Ram
grumpyoldtechs
11-10-2006, 12:19 PM
its a combination of java script and bbcode which is controlled by php.
its allot more complex than you realize take a look at some open source options:
http://www.openwebware.com/products/openwysiwyg/demo.shtml
http://www.dynamicdrive.com/dynamicindex16/openwysiwyg/index.htm
ramwaimea
11-11-2006, 02:14 AM
Thank you grumpyoldtechs and abz. Openwebware is really useful, although I haven't figured out exactly how to use it in my PHP form.
This wysiwyg editor is really sexy, but it may work very well in pure html forms. I have PHP form code that is working really well, as it is. I modified this code to include openwebware editor, many things got screwed up -- for example, htmlentities() and htmlspecialchars() functions I currently use are nullifying/conflicting with openwebware editor. I am working on modifying my code to work with openwebware editor.
Thank you for pointing me to this wonderful resource.
Ram
grumpyoldtechs
11-11-2006, 04:00 AM
there isnt much need to use htmlspecialchars() in php if its going into the database.
i always used to use this as a security method but after speaking to a few of the guys in the php forum was told that its not a way to go about things. you mights find using this functionmysql_real_escape_string() a bit better. then use stripslashes() on your display page
ramwaimea
11-11-2006, 05:12 AM
Thank you very much...I will check into both functions..
Ram
ray326
11-11-2006, 11:29 AM
http://tinymce.moxiecode.com/
ramwaimea
11-12-2006, 07:36 AM
Thank you ray326.