3 Replies Latest reply on Jan 26, 2010 1:11 PM by Nenad Nikolic

    Richface Editor, how to set text with javascript?

    Nenad Nikolic Newbie



      I want to set text in rich:editor manualy, with javascript function. Can anybody tell me how to do this?

      I need something like this:

      <script type="text/javascript">
          function insertText(id){
              var editor = document.getElementById(id);
              editor.value = "some text";


      <a4j:form id="form">
           <rich:editor id="editor" theme="advanced"
                       height="350" width="700">
                  <f:param name="theme_advanced_buttons1" value="" />
                  <f:param name="theme_advanced_toolbar_location" value="" />

           <a4j:commandButton value="Insert text" onclick="insertText('form:editor');" ></a4j:commandButton>



      Thanks for replay.