2

in classic ui, you can use xtype:cqinclude to include rtePlugins from a different path basically creating one place for standard RTE plugins, How can I do the same in Touch UI?

I have tried using the granite UI include widget, but that does not help as it was not meant for including nodes, but granite widgets/components

Ahmed Musallam
  • 9,523
  • 4
  • 27
  • 47
  • Possible duplicate of [is it possible to include files in the touch UI dialog?](http://stackoverflow.com/questions/33129828/is-it-possible-to-include-files-in-the-touch-ui-dialog) – rakhi4110 Jul 18 '16 at 05:58

2 Answers2

3

I found the solution by debugging RTE, I noticed that RTE sends a request to get the rtePlugins (as JSON) from JCR (using the JSON servlet). with that understanding, I was able to use sling:superResourceType on the rtePlugins node to refer to another rtePlugins node on the JCR. since the JSON servlet will actually respect the superType relationship. Read more abour Sling Resource Merger here: https://docs.adobe.com/docs/en/aem/6-1/develop/platform/sling-resource-merger.html

eg. if I define rtePlugins node under apps/project/customeRtePlugins/rtePlugins, then in my actual RTE in my touch dialog, I can do the following:

<rte
    jcr:primaryType="nt:unstructured"
    sling:resourceType="cq/gui/components/authoring/dialog/richtext"                                                                
    name="./rte"
    useFixedInlineToolbar="{Boolean}true">

    <rtePlugins 
         jcr:primaryType="nt:unstructured"
         sling:resourceSuperType="apps/project/customeRtePlugins/rtePlugins"/>

</rte>
Ahmed Musallam
  • 9,523
  • 4
  • 27
  • 47
2

I think the process is a little bit unique for RTE in the TouchUI. You will probably need to create an overlay of the Text component including a _cq_editConfig.xml This will have a configPath property pointing to the ClassicUI dialog as you can see in the example below. In the ClassicUI dialog.xml for the RTE, the element referenced in the configPath has the name attribute and also contains the element (rtePlugins) which contains all the RTE Plugin configurations

<cq:inplaceEditing jcr:primaryType="cq:InplaceEditingConfig" 
editorType="text" active="true" configPath="/apps/wcm/foundation/components/text/dialog/items/tab1/items/text"/>  
Cris Rockwell
  • 904
  • 2
  • 16
  • 30
  • due to this my inline edit toolbar does not contain the save, cancel and maximize button. can you help? – Vinit Pillai Nov 03 '20 at 12:55
  • Maybe if you post a well detailed question to SO with your overlay code, resource super type info, and instance version. Otherwise no I'm not sure i can. Good luck! – Cris Rockwell Nov 04 '20 at 14:37
  • No worries. I set the path of rtePlugins which was inside text in confPath rather than of text as you mentioned in your answer and it worked. – Vinit Pillai Nov 05 '20 at 07:31