PDA

View Full Version : Text Formatting


maloach
04-14-2005, 10:28 AM
I am new to PHP and mySQL and have a question concerning the formatting of a text field. On her old side, our client used to have the ability to cut a document from Word or other editor, and paste it into a field on a PHP form online. It would preserve the formatting (bold, italic, centering, underline, etc).

On Hostrocket, it simply dumps everything in as text. Is there a way to force a text field in mySQL/PHP to preserve this formatting when it is pasted in? Perhaps a different field type, or a way to paste in HTML text and have it recognize it as HTML. I was thinking also of a rich text type field, but this doesn't appear to be available in mySQL. Any suggestions?

Regards,
Mark Loach

Viper007Bond
04-14-2005, 10:56 AM
Pretty sure this is a HTML issue dealing with pasting formatted text into a textarea. But I've never even heard of anything like that being possible as usually input things in browsers only accept basic text.

Like try making something bold and pasting it into the reply box here at the forums. You'll just get the text.

iDxMan
04-15-2005, 09:41 AM
The only thing that's ever worked like that for me is while using a javascript-based editor such as htmlarea or fck. The formatting wouldn't be exact, but it would be enough to look decent.

-r