Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Customizing RTE fields for Content Fragment

Avatar

Level 9

Hello,

 

I have a RTE field for my content fragment model. Now, I want to enable only Bold, Italic, Underline option. So, for this I have kept StyledTextEditor.js in the location: /apps/dam/cfm/admin/clientlibs/v2/authoring/contenteditor/editors/ and modified the js file to display only the required feature. But, now when I expand the RTE field, this shows some error.

 

console-issue.jpg

 rte-issue.jpg

Anyone faced such type of issues while showing only the necessary fields in RTE?

One more query: Since I have overridden the js file here:

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

Is it possible to move to project specific folder? i mean /apps/xyz/clientlibs ?

cc @arunpatidar @SantoshSai  @giuseppebag @HrishikeshKagne 

Thanks in advance

3 Replies

Avatar

Level 10

hi @Mahesh_Gunaje,

this article appears to address your requirements.

For your second question, you can check the page for "I don’t want to overlay the existing StyledTextEditor.js file, do..."

 

Avatar

Community Advisor

Hi @Mahesh_Gunaje ,

In StyledTextEditor.js file you would see "rtePlugins" .
Please check what is being provided in that section, if it " * " then by default all plugin are added.
You can customize this section by adding or enabling only required features.

something like, this is sample code you can change it as per your need :

 'rtePlugins': {
        'edit': {        
            features= ['cut','copy','paste-plaintext','paste-wordhtml','paste-browser']
}

 

Also, while overlaying the JS file you would have to adhere to the file structure that means its has to be inside "/apps/dam/" .

 

Hope it helps!

-Tarun

Avatar

Level 9

Hi @TarunKumar  @giuseppebag 

 

I have kept the file here.

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

Tried in my local. Now, rte shows the necessary fields that is configured in above js file. I tried the same in dev author. When I use IP based url, I am able to see the necessary fields in RTE. But, when I try using dispatcher url, I can see all the options in RTE. Note: I have added alloProxy: true here

/apps/dam/cfm/admin/clientlibs/v2/authoring,

/apps/dam/cfm/admin/clientlibs/v2/authoring/contenteditor

Still, not able to see only the required option in rte under dispatcher url.

 

Have 1 more query. 

Hi @TarunKumar   @giuseppebag 

I have one more query.

can I keep the js file under project location. example: /apps/xyz/clientlibs/editors/StyledTextEditor.js