5 Replies Latest reply on May 18, 2009 6:12 PM by nbelaevski

    How to get contents of the editor in a Javascript

    onyii5119

      Does anyone know how to get the contents of the rich:editor in a Javascript and also update the editor from a Javascript?

      Example:
      <rich:editor id="editorId" width="400" height="150" value="#{manageTerms.bannerImageText}" language="#{manageTerms.editorLanguageCode}"
      configuration="editorFull" theme="advanced" >
      <f:param name="encoding" value="utf-8" />
      </rich:editor>

      The javascript:

      function appendToEditor(){
      // I want to get the current content of the editor
      ....................
      // I want to concatenate the current content with additional info
      ...................
      // I want to update the editor with the new data
      ...............................
      }

      These operations are trivial with tinyMCE. I have looking for a way to do it with rich:editor.

      Any help will be appreciated.

      Thanks.