Results 1 to 4 of 4

Thread: Rich Text Editor - Edit Problems

  1. #1
    Join Date
    Nov 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Rich Text Editor - Edit Problems

    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:

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

    I am using the following code:
    Code:
    writeRichText('msg', '<? echo $msg;?>', 700, 200, true, false);
    Viewing the source code (view source) of the page shows:

    Code:
    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???

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I think it's to do with the linebreaks. Try:
    Code:
    writeRichText('msg', '<?=str_replace("\n", '\n', $msg)?>', 700, 200, true, false);
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Nov 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Twey
    I think it's to do with the linebreaks. Try:
    Code:
    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.

  4. #4
    Join Date
    Jan 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    i can´t send the text to my database (php/mysql)..

    can you help me?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •