7 Replies Latest reply on Sep 29, 2013 3:54 PM by Lukáš Fryč

    rich:editor - how to access ckeditor object instance?

    sanyika Newbie

      Hi,

      just a simple thing:

      I am trying to access the ckeditor by calling a JS function like this:

       

      <rich:editor ondirty="setup(this);"  ..../>
      

       

      Here is the JS Script:

       

      function setup(riched){  
          var ckeditor;
          try {
              ckeditor = riched.getEditor();       
          }
          catch(Exception ) {
              alert(Exception)
          }
      }
      

       

      I get the following exception : "TypeError: riched.getEditor is not a function"

      Could you tell me please why the getEditor() function does not work? Has the JavaScript API changed? What should I do?

       

      Thanks for any help.