Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

How to disable the "links" plugin/functionality in an inline rich text editor in Touch UI?

Avatar

Level 2

Hi all,

We just enabled some inline text editing for a text component. When we start to edit the text, we get the the default inline text editing editor (Text formatting, paragraph, links, list ...)

But we need to disable the functionality to create hyperlinks. We've come so far that we can enable and disable find and replace, special chars etc. But when setting the "links" plugin id to "false", nothing happens, while the other, non-default plugins are gone.

What do we need to configure to get this working?

dialog.xml

<?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" title="Text" xtype="panel"> <items jcr:primaryType="cq:WidgetCollection"> <text jcr:primaryType="cq:Widget" hideLabel="true" name="./text" enableParagraphFormat="{Boolean}false" enableSourceEdit="{Boolean}false" enableSpecialChars="{Boolean}false" enableStyle="{Boolean}false" enableSubSuperScript="{Boolean}true" enableColors="{Boolean}true" xtype="richtext"> <rtePlugins jcr:primaryType="nt:unstructured"> </rtePlugins> </text> <isRichTextFlag jcr:primaryType="cq:Widget" ignoreData="{Boolean}true" name="./textIsRich" value="true" xtype="hidden"/> </items> </jcr:root>

_cq_editconfig.xml

<?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:sling="http://sling.apache.org/jcr/sling/1.0" jcr:primaryType="cq:EditConfig"> <cq:inplaceEditing jcr:primaryType="cq:InplaceEditingConfig" active="true" configPath="../../dialog/items/text" editorType="text"> </cq:inplaceEditing> </jcr:root>

 

Thanks in advance!

Mario

1 Accepted Solution

Avatar

Correct answer by
Level 2

Hi Feike, 

Yes, setting the value to "-" did the trick.

For others who have the same issue: if you want to disable a plugin in the Rich Text editor (RTE): set the features property to "-" (minus). This did the trick for us.

Thanks!

dialog.xml

<?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" title="Text" xtype="panel"> <items jcr:primaryType="cq:WidgetCollection"> <text jcr:primaryType="cq:Widget" hideLabel="true" name="./text" xtype="richtext"> <rtePlugins jcr:primaryType="nt:unstructured"> <format jcr:primaryType="nt:unstructured" features="*"/> <lists jcr:primaryType="nt:unstructured" features="*"/> <justify jcr:primaryType="nt:unstructured" features="*"/> <edit jcr:primaryType="nt:unstructured" features="*"/> <findreplace jcr:primaryType="nt:unstructured" features="*"/> <paraformat jcr:primaryType="nt:unstructured" features="*"/> <subsuperscript jcr:primaryType="nt:unstructured" features="*"/> <styles jcr:primaryType="nt:unstructured" features="*"/> <links jcr:primaryType="nt:unstructured" features="-"/> </rtePlugins> <externalStyleSheets jcr:primaryType="nt:unstructured" sheet1="/etc/designs/geometrixx/static.css"/> <cssStyles jcr:primaryType="nt:unstructured" myNewStyleClass1="myNewStyle1"/> </text> <isRichTextFlag jcr:primaryType="cq:Widget" ignoreData="{Boolean}true" name="./textIsRich" value="true" xtype="hidden"/> </items> </jcr:root>

View solution in original post

2 Replies

Avatar

Correct answer by
Level 2

Hi Feike, 

Yes, setting the value to "-" did the trick.

For others who have the same issue: if you want to disable a plugin in the Rich Text editor (RTE): set the features property to "-" (minus). This did the trick for us.

Thanks!

dialog.xml

<?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" title="Text" xtype="panel"> <items jcr:primaryType="cq:WidgetCollection"> <text jcr:primaryType="cq:Widget" hideLabel="true" name="./text" xtype="richtext"> <rtePlugins jcr:primaryType="nt:unstructured"> <format jcr:primaryType="nt:unstructured" features="*"/> <lists jcr:primaryType="nt:unstructured" features="*"/> <justify jcr:primaryType="nt:unstructured" features="*"/> <edit jcr:primaryType="nt:unstructured" features="*"/> <findreplace jcr:primaryType="nt:unstructured" features="*"/> <paraformat jcr:primaryType="nt:unstructured" features="*"/> <subsuperscript jcr:primaryType="nt:unstructured" features="*"/> <styles jcr:primaryType="nt:unstructured" features="*"/> <links jcr:primaryType="nt:unstructured" features="-"/> </rtePlugins> <externalStyleSheets jcr:primaryType="nt:unstructured" sheet1="/etc/designs/geometrixx/static.css"/> <cssStyles jcr:primaryType="nt:unstructured" myNewStyleClass1="myNewStyle1"/> </text> <isRichTextFlag jcr:primaryType="cq:Widget" ignoreData="{Boolean}true" name="./textIsRich" value="true" xtype="hidden"/> </items> </jcr:root>