common code of Text component to be used in all other component with RTE field | Community
Skip to main content
airnavin30
Level 2
September 14, 2020
Solved

common code of Text component to be used in all other component with RTE field

  • September 14, 2020
  • 1 reply
  • 936 views
We have a Text (RTE) component with some new text fields added to one of it's link icon.....we want to add the same text field related to that all other components where we have used field as RTE in a component...How can we reuse the Text component capabilities here?
 
How can we externalize this RTE plug-in  then point to every component whereever it is being used? any example?.
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Theo_Pendle

Hello @airnavin30,

You can re-use parts of your edit dialogs by using a Granite include node: https://helpx.adobe.com/experience-manager/6-5/sites/developing/using/reference-materials/granite-ui/api/jcr_root/libs/granite/ui/components/coral/foundation/include/index.html

 For example, by using adding the following node to a cq:dialog, you can re-use the configuration form the Core Components Text cq:dialog:

<include jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/include" path="core/wcm/components/text/v2/text/cq:dialog/content/items/tabs/items/properties/items/columns/items/column/items/text"/>

 This is the result

:

 

1 reply

Theo_Pendle
Theo_PendleAccepted solution
Level 8
September 14, 2020

Hello @airnavin30,

You can re-use parts of your edit dialogs by using a Granite include node: https://helpx.adobe.com/experience-manager/6-5/sites/developing/using/reference-materials/granite-ui/api/jcr_root/libs/granite/ui/components/coral/foundation/include/index.html

 For example, by using adding the following node to a cq:dialog, you can re-use the configuration form the Core Components Text cq:dialog:

<include jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/include" path="core/wcm/components/text/v2/text/cq:dialog/content/items/tabs/items/properties/items/columns/items/column/items/text"/>

 This is the result

: