I am setting up a dialog that has the following fields - 1. A field to accept image as an input 2. A field to accept a title 3. A field that will accept richtext.
Please note that I do not want to enable inplace editing. I just want to add a richtext field (with all features enabled) in my dialog and use the data entered in this field in my component.
I am able to implement 1. and 2. but dont know how to go about 3.
Here is my code -
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
jcr:primaryType="nt:unstructured"
jcr:title="Section Container"
sling:resourceType="cq/gui/components/authoring/dialog">
<content
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/container">
<layout
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/layouts/tabs"
type="nav"/>
<items jcr:primaryType="nt:unstructured">
<Styling
jcr:primaryType="nt:unstructured"
jcr:title="Styling"
sling:resourceType="granite/ui/components/foundation/section">
<layout
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns"/>
<items jcr:primaryType="nt:unstructured">
<column
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/container">
<items jcr:primaryType="nt:unstructured">
<question_single
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/textfield"
fieldDescription="Please enter the Question"
fieldLabel="Question for Single"
name="./question_single"/>
<question_couple
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/textfield"
fieldDescription="Please enter the Question"
fieldLabel="Question for Couple Applicants"
name="./question_couple"/>
<page_header
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/textfield"
fieldDescription="Please enter page header"
fieldLabel="Page Header"
name="./page_header"/>
</items>
</column>
</items>
</Styling>
<image
jcr:primaryType="nt:unstructured"
jcr:title="Image Properties"
sling:resourceType="granite/ui/components/foundation/section">
<layout
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns"
margin="{Boolean}false"/>
<items jcr:primaryType="nt:unstructured">
<column
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/container">
<items jcr:primaryType="nt:unstructured">
<file
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/fileupload"
autoStart="{Boolean}false"
class="cq-droptarget"
fieldLabel="Image asset"
fileNameParameter="./image/fileName"
fileReferenceParameter="./image/fileReference"
mimeTypes="[image]"
multiple="{Boolean}false"
name="./image/file"
title="Upload Image Asset"
uploadUrl="${suffix.path}"
useHTML5="{Boolean}true"/>
<title
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/textfield"
fieldLabel="Title"
name="./image/jcr:title"/>
</items>
</column>
</items>
</image>
</items>
</content>
</jcr:root>
Please ignore the fields in the first tab. richtext field needs to be added to the second tab.
Please help! Thanks in Advance!