简体   繁体   中英

Primefaces extensions CK editor always rendered as textarea

I am using pe:ckEditor in one of my pages but they are always rendered as text area. My code below.

<h:head>
    <h:outputScript library="primefaces" name="#{resource['jquery.js']}" />
    <h:outputScript library="primefaces-extensions"
        name="#{resource['primefaces-extensions.js']}" />
    <h:outputScript library="primefaces"
        name="#{resource['primefaces.js']}" />
</h:head>


<pe:ckEditor id="#{peId}" value="Sample"
    toolbar="[['Cut','Copy','Paste','PasteText','PasteFromWord','-', 'SpellChecker'], '/', ['Undo', 'Redo']]"
    skin="office2013">
</pe:ckEditor>

I have the resources ck editor jar also added in my pom file along with primefaces extensions

<dependency>
  <groupId>org.primefaces.extensions</groupId>
  <artifactId>primefaces-extensions</artifactId>
  <version>6.2.9</version>
</dependency>
<dependency>
  <groupId>org.primefaces.extensions</groupId>
  <artifactId>resources-ckeditor</artifactId>
  <version>3.1.0</version>
</dependency>

Am I missing something ?

You need to change your CKEditor import to match the version of extensions like this...

<dependency>
  <groupId>org.primefaces.extensions</groupId>
  <artifactId>primefaces-extensions</artifactId>
  <version>6.2.10</version>
</dependency>
<dependency>
  <groupId>org.primefaces.extensions</groupId>
  <artifactId>resources-ckeditor</artifactId>
  <version>6.2.10</version>
</dependency>

That will fix your issue. Those version must always match.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM