Expand my Community achievements bar.

Not able to reuse custom RTE dialog in another dialog

Avatar

Community Advisor

Hi,

I've a custom RTE in touch UI. That custom RTE when dragged on page works fine properly. It open up as in-place editor to add text.

But, when I re-use RTE dialog in another dialog node using properties :

sling:resourceType - granite/ui/components/foundation/include

path - <path of rte dialog>

It's displaying like - see the snapshot :

Only few option is coming but not the square box to open it in complete window mode unlike when we drag rte separately on page, we get icon to open it in full window,

 

 

RTE cq:dialog:

 

<?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="Rich Text" 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"> <text jcr:primaryType="nt:unstructured" jcr:title="Rich Text" sling:resourceType="granite/ui/components/foundation/container"> <items jcr:primaryType="nt:unstructured"> <fieldset jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/form/fieldset"> <layout jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns"/> <items jcr:primaryType="nt:unstructured"> <text jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/container"> <items jcr:primaryType="nt:unstructured"> <richtext jcr:primaryType="nt:unstructured" sling:resourceType="cq/gui/components/authoring/dialog/richtext" name="./text"> <richFlag jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/form/hidden" name="./textIsRich" value="true"/> </richtext> </items> </text> </items> </fieldset> </items> </text> </items> </content> </jcr:root>

 

 

RTE :  EDIT Config Node :

 

<?xml version="1.0" encoding="UTF-8"?> <jcr:root 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" cq:dialogMode="floating" cq:disableTargeting="{Boolean}true" cq:layout="editbar" jcr:mixinTypes="[cq:ReplicationStatus]" jcr:primaryType="cq:EditConfig"> <cq:listeners jcr:primaryType="cq:EditListenersConfig" afterdelete="REFRESH_PAGE" afteredit="REFRESH_PAGE"/> <cq:inplaceEditing jcr:primaryType="cq:InplaceEditingConfig" active="{Boolean}true" editorType="text"> <config jcr:primaryType="nt:unstructured"> <rtePlugins jcr:primaryType="nt:unstructured"> <links jcr:primaryType="nt:unstructured" features="*"/> <edit jcr:primaryType="nt:unstructured" features="*"/> <findreplace jcr:primaryType="nt:unstructured" features="*"/> <format jcr:primaryType="nt:unstructured" features="*"/> <image jcr:primaryType="nt:unstructured" features="*"/> <keys jcr:primaryType="nt:unstructured" features="*"/> <justify jcr:primaryType="nt:unstructured" features="*"/> <lists jcr:primaryType="nt:unstructured" features="*"/> <misctools jcr:primaryType="nt:unstructured" features="*"/> <paraformat jcr:primaryType="nt:unstructured" features="*"/> <spellcheck jcr:primaryType="nt:unstructured" features="*"/> <styles jcr:primaryType="nt:unstructured" features="*"> <styles jcr:primaryType="cq:WidgetCollection"> <regular jcr:primaryType="nt:unstructured" cssName="reg" text="Regular"/> <large jcr:primaryType="nt:unstructured" cssName="lrg" text="Large"/> <medium jcr:primaryType="nt:unstructured" cssName="med" text="Medium"/> <small jcr:primaryType="nt:unstructured" cssName="sml" text="Small"/> <blacktext jcr:primaryType="nt:unstructured" cssName="blackText" text="Black Text"/> <whitetext jcr:primaryType="nt:unstructured" cssName="whiteText" text="White Text"/> </styles> </styles> <subsuperscript jcr:primaryType="nt:unstructured" features="*"/> <table jcr:primaryType="nt:unstructured" features="*"/> <undo jcr:primaryType="nt:unstructured" features="*"/> <touchuicolorpicker jcr:primaryType="nt:unstructured" colors="[FF0000,FFA500,FFFF00,FF1493,FF4500,000000,000080]" features="*"/> </rtePlugins> </config> </cq:inplaceEditing> </jcr:root>
3 Replies

Avatar

Level 1

Hello Himanshu,

could you please send me dialog path (node level)?

is it till /apps/<project>/components/content/text/cq:dialog  or further?

Avatar

Level 10

I recommend keeping it 1-1. When you try 1-many - issues seem to occur.

Avatar

Level 10

Hi Himanshu,

I think, Scott is right.. I too tried many times 1 : Many, many issues occur for me.

Make sure you always keep RTE in separate node in dialog JCR branch.

~Ratna.