2 Replies Latest reply on Apr 11, 2014 2:28 PM by Serge Rogatch

    rich:editor doesn't render

    Serge Rogatch Newbie

      Hello,

       

      I am trying to use rich:editor of RichFaces 4.3.5 with Glassfish 4 and JSF 2.2. During the execution of the web page, the following JavaScript errors appear:

      Uncaught SyntaxError: Failed to set the 'innerHTML' property on 'Element': The provided markup is invalid XML, and therefore cannot be inserted into an XML document. ckeditor.js.jsf?ln=org.richfaces.ckeditor:56

      Error in event handler for (unknown): Cannot read property 'appendChild' of undefined Stack trace: TypeError: Cannot read property 'appendChild' of undefined at chrome-extension://decdfngdidijkdjgbknlnepdljfaepji/js/contentScript.js:196:53 at messageListener (extensions::messaging:340:9) at Function.target.(anonymous function) (extensions::SafeBuiltins:19:14) at EventImpl.dispatchToListener (extensions::event_bindings:395:22) at Function.target.(anonymous function) (extensions::SafeBuiltins:19:14) at publicClass.(anonymous function) [as dispatchToListener] (extensions::utils:69:26) at EventImpl.dispatch_ (extensions::event_bindings:378:35) at EventImpl.dispatch (extensions::event_bindings:401:17) at Function.target.(anonymous function) (extensions::SafeBuiltins:19:14) at publicClass.(anonymous function) [as dispatch] (extensions::utils:69:26)

      The source code I use for the editor is:

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

      <html xmlns="http://www.w3.org/1999/xhtml"

        xmlns:h="http://java.sun.com/jsf/html"

        xmlns:f="http://java.sun.com/jsf/core"

        xmlns:ui="http://java.sun.com/jsf/facelets"

        xmlns:a4j="http://richfaces.org/a4j"

        xmlns:rich="http://richfaces.org/rich">

      <h:head></h:head>

      <h:body>

        <h:form>

              <rich:editor id="editor" toolbar="full" value="#{editorBean.value}" style="margin-bottom: 1em">

                  <a4j:ajax event="change" render="panel" status="panelUpdateStatus" />

                  <a4j:ajax event="dirty" render="panel" status="panelUpdateStatus">

                      <a4j:attachQueue requestDelay="1000" />

                  </a4j:ajax>

              </rich:editor>

              

              <rich:panel id="panel">

                  <f:facet name="header">

                      Output from Editor

                      <a4j:status name="panelUpdateStatus">

                          <f:facet name="start">

                              (Updating)

                          </f:facet>

                      </a4j:status>

                  </f:facet>

                  <h:outputText escape="false" value="#{editorBean.value}" />

              </rich:panel>

            

          </h:form>

      </h:body>

      </html>