Expand my Community achievements bar.

SOLVED

RichText Editor paste options in AEM 6.4 Touch UI

Avatar

Community Advisor

Hello All,

I am trying to use the rte touch ui component in which I want to add paste options that were available as part of Classic UI.

For example as highlighted in below image.

1692298_pastedImage_0.png

I found from Configure the Rich Text Editor  that I can add the 'edit' property and value "*" to include the cut, copy, paste-default, paste-plaintext, paste-wordhtml.

However in Touch UI I am not able to provide all the pasting options but choose from browser, plaintext, or wordhtml to be added as a value for property "defaultPasteMode". (See Configure the Rich Text Editor plug-ins )

How is this achievable in AEM6 6.4 Touch UI? Or in AEM 6.4 Touch UI, can we provide all three pasting options as buttons when the rte dialog is opened?

I noticed that in either of the links I posted above there are no visuals that suggest about the paste buttons in Touch UI rte dialog

Please suggest.

Shubham

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

You can add those options like below by updating nodes under rtePlugins and uiSettings.

<rtePlugins jcr:primaryType="nt:unstructured">

            <edit

                jcr:primaryType="nt:unstructured"

                defaultPasteMode="plaintext"

                features="[cut,copy,paste-plaintext,paste-wordhtml]"/>

<uiSettings jcr:primaryType="nt:unstructured">

            <cui jcr:primaryType="nt:unstructured">

                <inline

                    jcr:primaryType="nt:unstructured"

                    toolbar="[edit#cut,edit#copy,edit#paste-plaintext,edit#paste-wordhtml



Arun Patidar

View solution in original post

4 Replies

Avatar

Community Advisor

Hi All, Any idea on this issue? I found this Text Component where "Paste as Text" and "Paste from Word" are available as options and buttons are visible how they would look in a Touch UI view.

I checked the core components for the "text" component (v2) but the "rtePlugins" node doesn't seem to have same details.

Avatar

Correct answer by
Community Advisor

Hi,

You can add those options like below by updating nodes under rtePlugins and uiSettings.

<rtePlugins jcr:primaryType="nt:unstructured">

            <edit

                jcr:primaryType="nt:unstructured"

                defaultPasteMode="plaintext"

                features="[cut,copy,paste-plaintext,paste-wordhtml]"/>

<uiSettings jcr:primaryType="nt:unstructured">

            <cui jcr:primaryType="nt:unstructured">

                <inline

                    jcr:primaryType="nt:unstructured"

                    toolbar="[edit#cut,edit#copy,edit#paste-plaintext,edit#paste-wordhtml



Arun Patidar

Avatar

Community Advisor

Thanks Arun. This is exactly what I was looking for. I haven't seen "edit#cut,edit#copy,edit#paste-plaintext,edit#paste-wordhtml" addition in inline toolbar in documentation. But now I understand how the syntax might have come by.