Expand my Community achievements bar.

SOLVED

TouchRTE instance doesn't end when I Close instead of Save

Avatar

Level 4

I am using AEM 6.3, Touch UI. I wanted to expand the default text component from we-retail by adding the RTE table plugin into the rich text editor. So I added a "cq:editConfig"  with this node structure:

<?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:lastReplicated="{Date}2013-09-09T11:02:05.843-07:00"
    cq:lastReplicatedBy="admin"
    cq:lastReplicationAction="Activate"
    jcr:mixinTypes="[cq:ReplicationStatus]"
    jcr:primaryType="cq:EditConfig">
    <cq:inplaceEditing
        jcr:primaryType="cq:InplaceEditingConfig"
        active="{Boolean}true"
        editorType="text">
        <config jcr:primaryType="nt:unstructured">
            <rtePlugins jcr:primaryType="nt:unstructured">
                <table
                    jcr:primaryType="nt:unstructured"
                    features="*">
                    <tableStyles jcr:primaryType="cq:WidgetCollection">
                        <centered
                            jcr:primaryType="nt:unstructured"
                            cssName="centered"
                            text="Centered"/>
                        <rightAligned
                            jcr:primaryType="nt:unstructured"
                            cssName="right_aligned"
                            text="Right Aligned"/>
                    </tableStyles>
                    <cellStyles jcr:primaryType="cq:WidgetCollection">
                        <grayShading
                            jcr:primaryType="nt:unstructured"
                            cssName="table.display tr.even.gradeU"
                            text="Grey Shading"/>
                    </cellStyles>
                    <defaultValues
                        jcr:primaryType="nt:unstructured"
                        border="1"
                        cellpadding="5"
                        cellspacing="0"
                        width="100%"/>
                </table>
            </rtePlugins>
        </config>
    </cq:inplaceEditing>
</jcr:root>

Now I can click the table icon 1739547_pastedImage_5.pngand create and manipulate tables. If I want those changes, I hit the next checkmark 1739548_pastedImage_6.png and save and close it up. But if I want to discard my changes, I hit X 1739549_pastedImage_7.pngto just close.

If I just close, the next time I open up that component instance, the tables icon will not show up. 1739550_pastedImage_8.png

Instead, the console will give a message "An instance of TouchRTE is already attached to the specified target element. Future versions of CoralUI will throw an exception at this point."

1739551_pastedImage_9.png

I can get around this by clicking the checkmark to save it, and then the next time it will be fine. But I shouldn't have to save it. The TouchRTE instance should end when I close it.

Is there a fix for this? Or some change in the node configuration?

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi Matt-H-

I think you are mixing two things here.

The error/warning is browser console that you see is not related to your use-case/issue. I think this shows up, in general, if you edit any OOTB Text component and seems like a minor bug.

Your issue seems like something we fixed some time back.

The issue was this -

RTE Plugins are not loading on opening RTE second time

Not sure which version you are on, but we fixed it in -

6.5.0

6.4.2.0

and 6.3.2.1

So, I suggest you to try with those versions or higher ones (preferrably latest ones) and see if your issue is resolved.

View solution in original post

4 Replies

Avatar

Level 10

We-Retail text component is a proxy component (and has a supertype) to core-text component. It already has RTE table plugin. you may want to check that for your use case

we-retail -- /apps/weretail/components/content/text

core component --  /apps/core/wcm/components/text/v2/text/cq:editConfig/cq:inplaceEditing/config/rtePlugins/table

Avatar

Level 4

Thanks Gaurav. This actually isn't my exact use case. It's a simplified, non-business-specific version, using the we-retail text component to make it easier to reproduce the issue. Our actual use case is a custom component from Classic that was brought over to Touch, with Touch dialogs then added to the component. But the example I gave highlights the exact problem without all the extra baggage.

Avatar

Correct answer by
Employee

Hi Matt-H-

I think you are mixing two things here.

The error/warning is browser console that you see is not related to your use-case/issue. I think this shows up, in general, if you edit any OOTB Text component and seems like a minor bug.

Your issue seems like something we fixed some time back.

The issue was this -

RTE Plugins are not loading on opening RTE second time

Not sure which version you are on, but we fixed it in -

6.5.0

6.4.2.0

and 6.3.2.1

So, I suggest you to try with those versions or higher ones (preferrably latest ones) and see if your issue is resolved.

Avatar

Level 4

That would explain it. I'm using 6.3.1.0. I will try the later service packs and see if that fixes it. Thank you so much!