Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

RTE plugin for "cq/gui/components/authoring/dialog/richtext" not working

Avatar

Level 9

So I have the following field and it's using my RTE plugin correctly

<heading
        jcr:primaryType="nt:unstructured"
        sling:resourceType="cq/gui/components/authoring/dialog/richtext"
        fieldLabel="Heading"
        height="3em"
        name="./heading"
        useFixedInlineToolbar="{Boolean}true">
    <rtePlugins
            jcr:primaryType="nt:unstructured"
            sling:resourceSuperType="myhost/global/options/rteplugin-config/rte-inline-editor/rtePlugins"/>
    <uiSettings
            jcr:primaryType="nt:unstructured"
            sling:resourceSuperType="myhost/global/options/rteplugin-config/rte-inline-editor/uiSettings"/>
</heading>

This is what I'm getting with the XML above

2023-08-04 07_45_38.png

This is the structure of the component dialog

2023-08-04 07_48_40.png

---------------------------

When I placed the same field into another component, I am getting something completely different.

2023-08-04 07_50_50.png

The only difference is that in the 2nd component, I'm using:

  • I'm using tabs
  • I'm using granite/ui/components/coral/foundation/include to include the tabs (it's a large dialog so I divided the dialog into several includes)

If I remove the includes and put everthing in the main dialog XML, it is working. Any ideas what I could be doing wrong?


These the XML for the 2nd component (the XML below is shorter to make it more concise. it's much larger in my code)

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root
        xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
        xmlns:granite="http://www.adobe.com/jcr/granite/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="Configure Multi-path component"
        sling:resourceType="cq/gui/components/authoring/dialog"
        extraClientlibs="[cbus.components.multi-path.author]"
        helpPath="en/cq/current/wcm/default_components.html#Text">
    <content
            jcr:primaryType="nt:unstructured"
            sling:resourceType="granite/ui/components/coral/foundation/tabs">
        <items jcr:primaryType="nt:unstructured">
            <tab2
                    jcr:primaryType="nt:unstructured"
                    jcr:title="Action Cards"
                    sling:resourceType="granite/ui/components/coral/foundation/container">
                <items jcr:primaryType="nt:unstructured">
                    <column
                            jcr:primaryType="nt:unstructured"
                            sling:resourceType="granite/ui/components/coral/foundation/include"
                            path="myhost/components/multi-path/dialogs/action-cards/items/actionCards/items/actionCard">
                    </column>
                </items>
            </tab2>
        </items>
    </content>
</jcr:root>

this is the included dialog

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:granite="http://www.adobe.com/jcr/granite/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="cq:Panel"
          title="API Dependencies">
    <items jcr:primaryType="cq:WidgetCollection">
        <actionCards
                jcr:primaryType="nt:unstructured"
                jcr:title="Action cards tab"
                granite:class="action-cards-section"
                sling:resourceType="granite/ui/components/coral/foundation/container">
            <items jcr:primaryType="nt:unstructured">
                <actionCard
                        jcr:primaryType="nt:unstructured"
                        sling:resourceType="granite/ui/components/coral/foundation/form/multifield"
                        composite="{Boolean}true">
                    <field
                            jcr:primaryType="nt:unstructured"
                            name="./actionCards"
                            sling:resourceType="granite/ui/components/coral/foundation/container">
                        <items jcr:primaryType="nt:unstructured">
                            <fieldset
                                    jcr:primaryType="nt:unstructured"
                                    sling:resourceType="granite/ui/components/coral/foundation/form/fieldset">
                                <items jcr:primaryType="nt:unstructured">
                                    <title
                                            jcr:primaryType="nt:unstructured"
                                            sling:resourceType="cq/gui/components/authoring/dialog/richtext"
                                            fieldLabel="Description"
                                            name="./title"
                                            required="true"
                                            useFixedInlineToolbar="{Boolean}true">
                                        <rtePlugins
                                                jcr:primaryType="nt:unstructured"
                                                sling:resourceSuperType="myhost/global/options/rteplugin-config/rte-inline-editor/rtePlugins"/>
                                        <uiSettings
                                                jcr:primaryType="nt:unstructured"
                                                sling:resourceSuperType="myhost/global/options/rteplugin-config/rte-inline-editor/uiSettings"/>
                                    </title>
                                </items>
                            </fieldset>
                       </items>
                    </field>
                </actionCard>
            </items>
        </actionCards>
    </items>
</jcr:root>




1 Accepted Solution

Avatar

Correct answer by
Community Advisor

It could be because of include type, which is breaking the inheritance and the only default plugins show up.

path="myhost/components/multi-path/dialogs/action-cards/items/actionCards/items/actionCard"

 

You can try to add this component using supertype instead of include if that works.



Arun Patidar

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

It could be because of include type, which is breaking the inheritance and the only default plugins show up.

path="myhost/components/multi-path/dialogs/action-cards/items/actionCards/items/actionCard"

 

You can try to add this component using supertype instead of include if that works.



Arun Patidar