title: Add or Append text in p:textEditor
body: <p>I have <code>p:textEditor</code> like the following</p>
  <pre><code>&lt;p:textEditor 
                  id=&quot;editor&quot;
                  widgetVar=&quot;editor&quot;
                  value=&quot;#{xxxController.editorText}&quot; 
                  height=&quot;300&quot; 
                  placeholder=&quot;Enter your content&quot;
                  toolbarVisible=&quot;false&quot;/&gt;
  </code></pre>
  <p>Have the following command button to add/append values to <code>p:textEditor</code></p>
  <pre><code>&lt;p:commandButton onclick=&quot;insertTag('[myValue]')&quot; value=&quot;myValue&quot; type=&quot;button&quot; /&gt;
  
  JavaScript
  &lt;script&gt;
               
          function insertTag( t )
          {
              PF( 'editor' ).insertText( t ) ;
          }
          &lt;/script&gt;
  </code></pre>
  <p>But i get <code>SCRIPT5007: Unable to get property 'insertText' of undefined or null reference</code> when i try to click the <code>&lt;p:commandButton</code>.</p>
  <p>So how do we insert/append text using widgetVar or JavaScript to <code>p:textEditor</code>?</p>
  <p><strong>Version details</strong></p>
  <p>JSF 2.2,
  PrimeFaces 6.2</p>