PDA

View Full Version : Rich Text Editor - Edit Problems



cparvin
11-19-2005, 10:47 PM
I can use RTE to create a text field, save with addslashes to a mysql blob field. I can retrieve the text field, use stripslashes and have my original field back. This is totally normal and as desired. BUT: :confused:

When I try to inport the field into RTE, the editor doesn't show up.

I am using the following code:

writeRichText('msg', '<? echo $msg;?>', 700, 200, true, false);

Viewing the source code (view source) of the page shows:


writeRichText('msg', '[[name]],

This is Message 1 of the autoresponder.


Conrad Parvin
Editor
', 700, 200, true, false);

This shows that the variable $msg is decoding as displayed html. BUT the editor does NOT display. If the variable $msg is empty, it WILL display.

Any ideas???

Twey
11-20-2005, 09:12 AM
I think it's to do with the linebreaks. Try:

writeRichText('msg', '<?=str_replace("\n", '\n', $msg)?>', 700, 200, true, false);

cparvin
11-20-2005, 08:42 PM
I think it's to do with the linebreaks. Try:

writeRichText('msg', '<?=str_replace("\n", '\n', $msg)?>', 700, 200, true, false);

Thanks, I had just about come to the same conclusion. I created a hard coded copy of same with no line breaks and it worked.

Thanks a lot for your fast reply.

rcdesign
01-17-2006, 08:11 PM
i canīt send the text to my database (php/mysql)..:(

can you help me?