Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Returning text with some format

Status
Not open for further replies.

maxelcat

Technical User
Oct 19, 2006
79
Hi - making a page that a non-technical user can use to update another page on his website.

AM using php and mysql to do this. Its my first database experience.

Reached the stage where the new content can be placed into the database and can then use queries to get the data back.

Feel a bit smug now!!!

The issue now is that the user will be cutting and pasting from a word document. He wont be using tables and the like, but tabs, bold underline - that sort of stuff.

I have one of his docuemnts and have tried to use it. The data comes back from the query fine, but its lost its formatting, I get new lines but nothing lines up - its all very confusing. I kind of expected this though, so its no big surprise.

I remembered that some folk on here had suggested using the SPAW editor, and said how easy it was to use..... I have downloaded it and read some of the help files. I could hear them flying gracefully over my head.

Before I make more coffee and set off to really study them perhaps someone could kindly tell me if they will meet my prupose! Will using it enable me to retain the formatting that the client (I use that term very loosely...) will use - thereby ensuing that it really is just a question of cutting and pasting? WIll the queries then return more formatted data?

Thanks as ever

Edward
 
i'd recommend fckeditor. neat integration.

or check out the dojofoundation - their wysiwig editor is great although integration is not so straightforward.

but ... i am not convinced that any of these will allow formatting to be retained from a cut and pasted word document. typically the pasted code has no formatting. the formatting that is added in the editor will be maintained though.

line breaks from pasted code can be maintained by outputting the database column value after running it through nl2br().
 
FCKeditor will retain Word formatting although if you want to control the look of your website via CSS, it also has the Paste from Word option which only preserves the paragraphs upon pasting. I do believe most other solutions will retain bullets, numbering, bold, italics, underline and font styles from Word.
 
@OP

i see you have posted the same message in the html forum. message timestamps are only 3 minutes apart.

please do not cross-post. it is not considered to be polite. If you do not get an answer in one forum, ask to which forum your post might be better directed, then go there.

 
OK apologies, didn't want to be rude

Just under time pressure - and this forum is SO useful

Wont do it again

[bigears]
 
no worries. hope you got the answers you are looking for.
 
Have to say since I posted I have made tremendous progress - think I am nearly at an acceptable place

God bless this forum!

Edward
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top