Cute Editor not properly displaying formatted content of MySQL field

Last post 04-20-2010, 2:45 AM by hvtoor. 1 replies.
Sort Posts: Previous Next
  •  05-09-2008, 2:04 AM 40237

    Cute Editor not properly displaying formatted content of MySQL field

    I have a page for entering text in a MySQL database and another one for editing it.
     
    Entering the text with CE is no problem, the text and the formatting tags are properly stored in the MySQL database field (checked with PHPMyAdmin).
     
    When trying to edit the previously entered text, CE displays this text with the formating tags, but the text in the CE field is itself not formatted by this tags.
    So instead of "This is bold text" I see "This is <strong>bold</strong> text"
     
    What am I doing wrong?
     
    This is the code of the form in which I want to edit the previously entered text:
     
    <form action="<?php echo $editFormAction; ?>" method="post" name="form1" id="form1">
      <table align="center">
        <tr valign="baseline">
          <td nowrap="nowrap" align="right">Omschrijving:</td>
          <td><input type="text" name="omschrijving" value="<?php echo htmlentities($row_Content['omschrijving'], ENT_COMPAT, 'utf-8'); ?>" size="32" /></td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap" align="right" valign="top">Tekst:</td>
          <td>
          <?php
             $editor=new CuteEditor();
             $editor->ID="tekst";  // same ID as your textarea
             $editor->Text=htmlentities($row_Content['tekst'], ENT_COMPAT, 'utf-8'); // Set value
             $editor->FilesPath="CuteEditor_Files";
             $editor->Draw();
             $editor=null;
      
             //use $_POST["cont_text"]to catch the data
    ?>
          </td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap" align="right">&nbsp;</td>
          <td><input type="submit" value="Record bijwerken" /></td>
        </tr>
      </table>
     
    Any help will once again be greatly appreciated.
     
    Erik
  •  04-20-2010, 2:45 AM 60240 in reply to 40237

    Re: Cute Editor not properly displaying formatted content of MySQL field

    Hi Eric,
     
    did you already solve your problem.
     
    I get the same thing.
     
    Hope you can help though it is lang ago for you!
     
    Hugo
View as RSS news feed in XML