AEM SPA React - specific Component Authoring dialog clientlib | Community
Skip to main content
September 15, 2022
Solved

AEM SPA React - specific Component Authoring dialog clientlib

  • September 15, 2022
  • 1 reply
  • 596 views

Is it possible to add clientlib to target 1 components authoring dialog?

I have a component that when using the pathbrowser to load data, would grey out all other dialog fields. 

I would like to grey out options in General, Padding, Margin tabs and maybe have a disclaimer saying Content frament is in use? As the content fragment json loaded from the pathbrowser is overriding the values. Is this possible? I only want to affect this specific RTE Component. and nothing else. 

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 Sachin_Arora_

@juanec2  You can use “extraClientlibs” property on the dialog to load a clientlibs applicable only for it. You can add your custom logic in this clientlibs.There are few things that you need to take care of when using extraClientlibs :

1. DO not include every custom JS client library into the cq.authoring.dialog category
2. Every component dialog with custom JS code have to be placed in a separate category, easy to use package or folder path as a category name, this prevents category name overlap
3. Make a rule to put validation that we are working with the required dialog at the JS beginning, if not – bypass the execution

Link : https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-dialog-with-extraclientlibs-do-not-shot-yourself-in-the-foot/td-p/397053

 

1 reply

Sachin_Arora_
Community Advisor
Sachin_Arora_Community AdvisorAccepted solution
Community Advisor
September 16, 2022

@juanec2  You can use “extraClientlibs” property on the dialog to load a clientlibs applicable only for it. You can add your custom logic in this clientlibs.There are few things that you need to take care of when using extraClientlibs :

1. DO not include every custom JS client library into the cq.authoring.dialog category
2. Every component dialog with custom JS code have to be placed in a separate category, easy to use package or folder path as a category name, this prevents category name overlap
3. Make a rule to put validation that we are working with the required dialog at the JS beginning, if not – bypass the execution

Link : https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-dialog-with-extraclientlibs-do-not-shot-yourself-in-the-foot/td-p/397053