Link to home
Start Free TrialLog in
Avatar of steva
steva

asked on

Submitting an HTML page to PHP

I have a Rich Text Editor that will create a bunch of HTML on a page, including images, according to whatever the user inserts.  The RTE actually creates an iFrame to put all the HTML into.   Now I want to "submit" that page/iFrame to a PHP script that will store the HTML into a database so that at a later time the same page/iFrame can be recreated by passing PHP a pointer to this record.

Is this possible?

How am I going to "submit" a full page of HTML or an iFrame?

Is ajax a solution here?

Thanks for any ideas or suggestions.

Steve
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Do you have any code written yet?  I have used TinyMCE for some parts of this before.  It was a semi-satisfactory solution.
SOLUTION
Avatar of p_nuts
p_nuts
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of steva
steva

ASKER

Ray,

No code yet.  I've been playing with the xinha RTE.  TinyMCE seems to be similar.  The problem I'm thinking about now, though, isn't which RTE to use but how to handle what the RTE creates.

p_nuts,

Thanks for the list of RTEs.  I see Xinha on there, toward the bottom.  But again, the issue now is how to handle the RTE output, not so much what RTE to use. You mention that most RTEs have a submit button that " submits the form the editor instance is member of.. There are also methods you usually can use or just a simple submit."  

I haven't noticed a Submit button anywhere on the Xinha RTE.  I guess I could put the textarea that I give to xinha into a <form> and try submitting it.  I'm not sure what I'd get in the POST data since xinha turns the textarea into an iFrame.  I should give it a try, though.  Or I could look for an RTE that already has a Submit button.

Dr Damnit,

Your number 1 point seems to address the issue here,  but the reference goes on and on and on.  Is that all really necessary to do this?  Plus it looks like it comes from the  ASP.NET world, which I want to stay as far away from as I can.

General Comment

What I want do seems similar to what Experts Exchange is doing here.  We all  enter text, which could be formatted and include embedded images, and then we hit a  Submit button.  Experts Exchange then apparently saves it all away in a database, since people can search for questions and pull it all down again with the images.   What's going on there?

I said initially that I wanted to store the output in a database, but thinking a bit more about it, I guess it doesn't have to be a database.  It might be enough to just save it as an html or php file.

Thanks for your input.  I really appreciate it!

Steve
Avatar of steva

ASKER

I said above that the Xinha RTE didn't have a Submit button but I notice that example on their web site does have a Submit, while the one I integrated into my site doesn't .  I guess I left off an option somewhere.   I'll definitely look into that.
I think you have a web / software conflict here.

When you say RTE, is this a software RTE that is on your computer or have you created a web page where you enter in information (like we have here on EE).

If it is the former, then you have to follow my steps (or something analogous). If it is the later, then tinyMCE is a great tool.

Which is it? Software or webpage? Where are you typing up the rich text?
Avatar of steva

ASKER

It's the latter.  I want to create a web page that will present visitors with an RTE that lets them "build masterpieces"  that I will save for them. The twist here is the kind of objects that the RTE lets them build with. I have a lot of customization to do on the RTE once I choose one.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of steva

ASKER

Thanks for the discussion.  I split the points.
Avatar of steva

ASKER

Ray,

I'm leaning toward TinyMCE, based on this discussion and finding them highly recommended everywhere I look. Plus,  they're coming out soon with a major new release (4.0) and Apple has chosen them for their new iCloud. But I'm curious about your comment:

I have used TinyMCE for some parts of this before.  It was a semi-satisfactory solution.

Would you care to share any details about your experience?

Steve
Sure.  When you have office workers who are used to cut-and-paste in Word, on of the first things they will do is cut from Word and paste into TinyMCE.  The result is a lot of non-value-added work to clean up the mess!

Another occasional FU occurs when a non-technical client gets confused about the markup.  It's like all things with computers - there is something of a requirement for precision, and when precision breaks down, chaos can break out.

So my overall view is that it can work well, but only if you understand exactly what it is doing to your data.
Avatar of steva

ASKER

Thanks for that, Ray.