How can I insert this RTF content into a MySQL database?

Here's the project:

Several users are copying and pasting from different sources into an email and then sending it out to their various constituencies. It looks like this:

screenshot
What I want to do is create an administrative interface that can capture the content that they've copied in a text field of some sort, including the little spreadsheets that they're grabbing, using PHP. And then turn around and regurgitate that content with all the formatting and visuals they originally copied in the context of a PHP page.

How?

How do you take RTF and allow it to "talk" to PHP and vice versa so the end result has all of the visual bells and whistles that were originally copied and pasted?

Smell that?

That's the smell of an opportunity, right there!
brucegustPHP DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
There is no generic way to do that.  You can capture the static HTML content and save it to a file but it will lose any programming interaction.  When you look at the HTML content, there is no way to tell what it took to generate it.

You would have to write a PHP program to recreate the interactive part of it.  And it would have to be unique to the functions used.

It does not smell like opportunity, it smells like a lot of work for little gain.
0
Julian HansenCommented:
What I want to do is create an administrative interface that can capture the content that they've copied in a text field of some sort, including the little spreadsheets that they're grabbing, using PHP.
Will they cut and paste into the admin interface or are you wanting to capture the email and get it from there?
And then turn around and regurgitate that content with all the formatting and visuals they originally copied in the context of a PHP page.
"regurgitate" where - HTML?
If the original source is RTF then you might want to start here
http://www.codeproject.com/Articles/27431/Writing-Your-Own-RTF-Converter
Which confirms Dave's comment about the lot of hard work.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
brucegustPHP DeveloperAuthor Commented:
OK, thanks guys!

I have found something that may work, based on some of the positive comments that have been made, but I've run into a snag. If you want to weigh in, check it out at http://www.experts-exchange.com/questions/28736036/What-am-I-doing-wrong-with-this-function.html

As always, thanks for your expertise.
0
Julian HansenCommented:
Nice catch Dave, I did not know that MS had done that. It seems they changed one unwieldy format for a grossly verbose version of a more pliable one - imagine that - from MS?

Here is what the above looks like as an html page

You can try one of the WYSIWIG editors - not sure about the results though because there appear to be a lot of custom tags in there and as mentioned above MS can be somewhat verbose in the markup it generates and I know from past experience tools like tiny proactively (until you tell them not to) strip tags from the content.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.