Expand my Community achievements bar.

CF Plugin Cusomization

Avatar

Level 3

Hi Team, 

 

In our AEM instance, there are multiple different projects are installed and the requirement is to customize the content fragment editor plugin for multiple projects without impacting one another. I know we can override the StyledTextEditor.js to make the required RTE plugin customization for content framgment but the problem is, if we override the changes under /apps/dam/ that would impact all the projects. 

 

/apps/dam/cfm/admin/clientlibs/v2/authoring/contenteditor/editors/StyledTextEditor.js

 

Also we have another option to create a JS and add it to dam.cfm.authoring.contenteditor.v2 category with the required customization if we don't want to override under /apps/dam but the problem with the approach is, it would impact other projects as well since we are adding it dam.cfm.authoring.contenteditor.v2 category. 

 

I just wanted to know how to customize the plugin specific to the projects without impacting one another. Please let me know if anyone handled the similar customization in your project.

2 Replies

Avatar

Community Advisor

@test1234567 - Please note that 

/apps/dam/cfm/admin/clientlibs/v2/authoring/contenteditor/editors/StyledTextEditor.js is granite:InternalArea which means it is not advisable to change any content within this space.

 

The other approach you suggested is using the clientlib dam.cfm.authoring.contenteditor.v2 which could be one way but keep in mind that for every service pack upgrades, you will need to test the functionality as it won't be future proof.

If there is absolute need only then you can use this approach and if you have separate projects I assume it would be based on paths e.g. /content/<project_name>/us/en

So within the JS, you can have an if condition which will check if window.location.pathname matches your project only then pick the customization.

 

Avatar

Level 3

Thanks for your reply. Can you tell me where it needs to added(tyledTextEditor.js) so that it won't impact other projects in the same instance?