The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

If I set $Message = 'hello' then it works and the message is inputed onto the rich text editor and appears. But when I try to retrieve the variable via $Message = $_SESSION['Message'] or from a database $Message = $INFO['Message'] ... the whole text editor disappears! How do I keep the data in the rich text editor from disappearing after a refresh by storing the variable with javascript or something else. Im a javascript newbie so please help me out. Thanks

Just remember that any text you insert into a page with PHP becomes part of the page's HTML, JavaScript, or CSS from the browser's point of view. If you start getting JavaScript errors and you know the JavaScript is correct, view source to see if the PHP is messing it up.

This is really annoying. I thought the quotes were the problem but I found out that when the Javascript adds code to modify the font, it used double quotes " within all the code it adds. This shouldn't effect single quotes. I believe I'm a pretty smart web designer, and I've tested everything! I think if found a gap in the coding possibilities!!!

This is an example of the code that would go into the INITIAL TEXT place

HTML Code:

<span class="style3"><span class="style3">The title says it all... <span style="font-weight: bold;">How much would insurance cost for a 2004 lamborghini gallardo?</span><br><br>It is relatively new and no modifications. I Added a picture, im not sure if the color has anything to do with the quote?</span>

If I put the above code directly into the INITIAL TEXT place, it will output in the text editor perfectly.

IT WORKED. It outputted data. But then when I had code to change the data, the whole text editor disappeared again!

I used the database because I thought that when there was an error and there was a message in the text editor, it would store the message in the database and output it in the text editor. But for some data it disappeared.

I've used that particular RTE myself, and I can tell you that Internet Explorer changes all of the HTML. Choosing a different free editor script probably won't help, as it's Microsoft's second-guessing everything (as usual) that causes it. I've had to develop some extremely elaborate workarounds to get those editors to do what I want them to do. My advice is to keep the editing features to a bare minimum if you're not experienced at hacking other people's code. Either that or pay for an editor that has been painstakingly kludged to overcome most of the major IE code tampering issues.