Expand my Community achievements bar.

SOLVED

extract widget from dialog

Avatar

Level 4

Hi,

I have a lot of components with a richtext inside the dialog and i need to unify the code.

Is there a way to extract the widget from the dialog and move it in a common folder?

Each component must has a link to this common widget.

Thanks

1 Accepted Solution

Avatar

Correct answer by
Level 10
4 Replies

Avatar

Correct answer by
Level 10

Avatar

Level 4

I'm trying to extract the rteplugin from a richtext:

 

<?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" jcr:primaryType="cq:Dialog" height="700" width="900" xtype="dialog"> <items jcr:primaryType="cq:WidgetCollection"> <tabs jcr:primaryType="cq:TabPanel"> <items jcr:primaryType="cq:WidgetCollection"> <panel1 jcr:primaryType="cq:Widget" title="Edit component" xtype="panel"> <items jcr:primaryType="cq:WidgetCollection"> <text jcr:primaryType="cq:Widget" boxMaxHeight="80" fieldLabel="Text" name="./text" removeSingleParagraphContainer="{Boolean}true" xtype="richtext"> <rtePlugins jcr:primaryType="nt:unstructured" path="/mypath/sharedCode/rtePlugins.infinity.json" xtype="cqinclude"/> </text> </items> </panel1> </items> </tabs> </items> </jcr:root>

 

 

<?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" jcr:primaryType="nt:unstructured"> <links jcr:primaryType="nt:unstructured" features="*"/> <format jcr:primaryType="nt:unstructured" features="*"/> <justify jcr:primaryType="nt:unstructured" features="*"/> <undo jcr:primaryType="nt:unstructured" features="*"/> <misctools jcr:primaryType="nt:unstructured" features="*"> <specialCharsConfig jcr:primaryType="nt:unstructured"> <chars jcr:primaryType="nt:unstructured"> <arrow jcr:primaryType="nt:unstructured" entity="&amp;rarr;"/> </chars> </specialCharsConfig> </misctools> </jcr:root>

 

This code raises the following error:

Error during processing of /mypath/sharedCode/rtePlugins: javax.jcr.nodetype.ConstraintViolationException: No child node definition for rtePlugins

Why?

Thanks

Avatar

Level 10

Under retPlugins - is the proper nodes there. If they are not set properly or are missing - this error may result.

Are you working in Touch UI? 

Avatar

Level 4

I'm not working with a touch ui and the structure is the same of a working rte, i have only extracted an inner part