HTML code visible

Last post 04-28-2010, 10:11 AM by Adam. 7 replies.
Sort Posts: Previous Next
  •  04-20-2010, 6:13 AM 60243

    HTML code visible

    When i would edit existing a existing MySQL database field which has been filled with Cute Editor I get the HTML code back.
     
    Is there a solution for this so that only the text which I want to edit is visible and wil be written back to MySQL?
     
    Here is my existing code:
     
    <?php
                    //Step 2: Create Editor object.   
                    $editor=new CuteEditor();   
        $editor->Text=htmlentities($row_rsArtikelBewerken['hoofdtekst'], ENT_COMPAT, 'utf-8'); // Set value
                    $editor->AutoConfigure="Compact";
        $editor->CustomCulture="nl-nl";
        $editor->EditorBodyStyle="font:normal 14px calibri;";
        //Step 3: Set a unique ID to Editor   
        $editor->ID="hoofdtekst";
        $editor->Width="665px";
        $editor->Height="225px";
                    //Step 4: Render Editor   
                    $editor->Draw();   
                ?>
    Filed under:
  •  04-20-2010, 7:52 AM 60246 in reply to 60243

    Re: HTML code visible

    You need save html code to your database, or else your format will be missing.
     
    Regards,
    Eric
  •  04-21-2010, 3:29 AM 60270 in reply to 60246

    Re: HTML code visible

    Dear Eric,
     
    thank you for your quick answer.
     
    I'm just a beginne with Cute Editor.
     
    Which code must I add to my existing code?
     
    For sure I will describe my problem again:
    The page where I want to view the added text displays it right.
    But when I want te edit the existing text I get te the text with the HTML code in Cute Editor.
  •  04-22-2010, 2:35 PM 60326 in reply to 60270

    Re: HTML code visible

    You can use Editor.Text property to set/get content of Cute Editor.
     
    For example, you can load the html code from your database then pass it to Cute Editor.
     
    editor.Text=valuefromdatabase;
     
    After finishing editing, you can extract the content from editor and save it into your database.
     
    valuefromeditor=editor.Text;
     
    Hope it helps.

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  04-23-2010, 5:27 AM 60341 in reply to 60326

    Re: HTML code visible

    Thank you for your answer.
     
    Maybe I don't understand you but when you look at my code is that the rule below which is made yellow?
     
    For example posted the text: :This is a test.
    When I want to edit the text with CE I got back from my database: <div>This is a test.</div>
     
    I hope you can help me again.
     
    <?php
                    //Step 2: Create Editor object.   
                    $editor=new CuteEditor();   
        $editor->Text=htmlentities($row_rsArtikelBewerken['hoofdtekst']); // Set value
        $editor->AutoConfigure="Compact";
        $editor->CustomCulture="nl-nl";
        $editor->EditorBodyStyle="font:normal 14px calibri;";
        
        //Step 3: Set a unique ID to Editor   
        $editor->ID="hoofdtekst";
        $editor->Width="665px";
        $editor->Height="225px";
        
                    //Step 4: Render Editor   
                    $editor->Draw();
                ?>
       
  •  04-27-2010, 2:22 PM 60475 in reply to 60341

    Re: HTML code visible

    Just pass the value from your database to editor via Editor.Text property.

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  04-28-2010, 3:33 AM 60493 in reply to 60475

    Re: HTML code visible

    Where in my code should I put this Editor.Text code?
     
    Can you please tell me!
  •  04-28-2010, 10:11 AM 60506 in reply to 60493

    Re: HTML code visible

    <?php
                    //Step 2: Create Editor object.   
                    $editor=new CuteEditor();   
        $editor->Text=DATAFROMDATABASE// Set value
        $editor->AutoConfigure="Compact";
        $editor->CustomCulture="nl-nl";
        $editor->EditorBodyStyle="font:normal 14px calibri;";
        
        //Step 3: Set a unique ID to Editor   
        $editor->ID="hoofdtekst";
        $editor->Width="665px";
        $editor->Height="225px";
        
                    //Step 4: Render Editor   
                    $editor->Draw();
                ?>

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View as RSS news feed in XML