problem setting output file for multiple editable pages

  •  04-02-2008, 12:55 AM

    problem setting output file for multiple editable pages

    I want two editable pages (using the IP license), each writing a separate output file.  The code below is for one of the pages.
     
    I'm using;
                          $editor->LoadHTML("news1.html");
                          $editor->SaveFile("news1.html");
     
    but it's still outputting to "document.html"?... is there another place I need to set this, perhaps in the CuteEditor_Files folder?
     
    Thank you.
     

     
    <?php include_once("CuteEditor_Files/include_CuteEditor.php") ; ?>
    <html>   
        <head>
            <title>Edit Static Html Example -- PHP Content Management, PHP WYSIWYG, PHP HTML Editor, PHP Text Editor</title>
             <link rel="stylesheet" href="php.css" type="text/css" />
        </head>
        <body>
        <form name="theForm" action="Edithtml.php?postback=true" method="post">
                        <h1>Edit Static Html</h1>
                        <div>
                            This example demonstrates you can use Cute Editor to edit static html page.
                            <br />
                            <br />
                        </div>
                        <br />
              <?php
                    $editor=new CuteEditor();
                    $editor->ID="Editor1";
                //  $editor->EditorBodyStyle="font:normal 12px arial;";
                    $editor->EditorWysiwygModeCss="php.css";
                    $editor->FilesPath="CuteEditor_Files";
                    $editor->EditCompleteDocument=true;
                    if (@$_GET["postback"]!="true")
                      {
                          $editor->LoadHTML("news1.html");
                      $editor->Draw();
                      }
                    else
                    {
                          $editor->SaveFile("news1.html");
                      $editor->Draw();
                    }
                    $editor=null;
                   
                    //use $_POST["Editor1"]to catch the data
                ?>
                    <textarea name="textbox1" rows="2" cols="20" id="textbox1" style="font-family:Arial;height:250px;width:730px;">
    <?php echo @stripslashes($_POST["Editor1"]) ;?>
                </textarea>   
            </form>
        </body>
    </html>
View Complete Thread