javascript initialize editor

Last post 06-16-2009, 10:29 PM by gman. 2 replies.
Sort Posts: Previous Next
  •  06-16-2009, 3:26 AM 53164

    javascript initialize editor

    I'm using the editor by downloading an empty editor via ajax - then downloading html pages also via ajax and loading it into the editor with javascript (editor.setHTML())
    I pretty much have everything working fine but I'd like to know if there is a way to re-initialize the editor with javascript before I load new html pages?
     
    I've looked through the 'Ajax-Rich-Text-Editor.php' example but this doesn't quite do what I want.
    I did spot CuteEditor_BasicInitialize(editor) and CuteEditorInitialize(Ox91a, Ox91b) but can't seem to get these to do anything useful.
  •  06-16-2009, 2:06 PM 53184 in reply to 53164

    Re: javascript initialize editor

    gman,
     
    Cute Editor is not a pure JavaScript Editor.  Many security setting must be Initialized from the server side.
     
    I suggest you use this example: http://phphtmledit.com/Ajax-Rich-Text-Editor.php
     
     
    The following method may help:
     

    Editor.GetString Method

    This function returns what the Draw function used to write to the response buffer as a string.

     


    Example Code

    <?php
             $editor=new CuteEditor();
             $editor->ID="Editor1";
             $editor->Text="Type here";
             $editor->FilesPath="CuteEditor_Files";
             echo $editor->GetString();
             $editor->Draw();
             $editor=null; 

             //use $_POST["Editor1"]to catch the data
    ?>
     

    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

  •  06-16-2009, 10:29 PM 53192 in reply to 53184

    Re: javascript initialize editor

    Cool.  I'm already doing something like that but I was really hoping to just cache/store the editor on the client side and only send html pages to load into the editor. Again, I pretty much have this working - just wanted to know for 'completeness' if I could re-initialize the editor via javascript.
     
    Thanks Adam.
View as RSS news feed in XML