Hi, I'm working on my third CMS, now fully ajax, faster and nicer. The thing is, I have a page with the RTE editors for html wysiwyg editing but cannot refresh it. Let me explain.
I'm using Kevin Roths RTE (I've used it before with form post and then reloading the page). I can make it save the data via form post but cannot set the RTE to any other kind of data once is already built. The question is NOT related to Kevins implementation or functions, instead I'm looking for javascript-ajax alternatives. (the documentation shows no signs of refresh, rebuild or similars).
1. I came with this idea, loading the page, building the RTE and then getting the whole document innerHTML and store it on a variable. Then I tried to restore the document with the variables content, it works but the RTE losses its functionality.
Any ideas on how to set, refresh or rebuild an RTE?
2. using an iframe. I came up with this other idea, I load an html page on an iframe to build the RTE with X content. It works, it is the best approach so far. The iframe is inside a floating layer and I added the function to make it fade in, nice. Still, when I change the src of the iframe it shows the OLD content until the page is loaded with the new content.
I tried to set the src to "" or to a blank page and THEN load the right page. BUT, instead of making the iframe content blank and then load the new page, it shows the old content and then the new one. In short, it seems like setting the src of an iframe to something and then change it only shows the last command to set the src... I also tried to set the body of the iframe to "" before change it to the right url but it doesn't go blank.
thanks in advance, I've been trying hard to solve this but no luck so far.