Skip to content

Latest commit

 

History

History
44 lines (33 loc) · 1.24 KB

README.md

File metadata and controls

44 lines (33 loc) · 1.24 KB

AEM-SunEditor

Enables using http://suneditor.com in AEM dialogs as an RTE replacement.

Deploy the code

From source

mvn clean install -PautoInstallPackage

pre-built package

get the latest from releases

Usage

Here is a sample cq:dialog:

<cq:dialog jcr:primaryType="nt:unstructured"
  sling:resourceType="cq/gui/components/authoring/dialog"
  jcr:title="SunEditor"
  extraClientlibs="[suneditor]">
  <content jcr:primaryType="nt:unstructured"
    sling:resourceType="granite/ui/components/coral/foundation/container">
    <items jcr:primaryType="nt:unstructured">
      <textarea jcr:primaryType="nt:unstructured"
        sling:resourceType="granite/ui/components/coral/foundation/form/textarea"
        fieldLabel="Sun Editor"
        granite:id="suneditor"
        name="./html"
        resize="vertical"
        rows="20"/>
    </items>
  </content>
</cq:dialog>

The important parts are:

  1. on cq:dialog node, add extraClientlibs="[suneditor]"
  2. create a text area field: sling:resourceType="granite/ui/components/coral/foundation/form/textarea"
  3. set granite:id="suneditor" on the text area.