How to add more heading options to the Paragraph Format dropdown for a content fragment? | Community
Skip to main content
April 8, 2025
Solved

How to add more heading options to the Paragraph Format dropdown for a content fragment?

  • April 8, 2025
  • 3 replies
  • 830 views

Hi 

I am trying to add more heading option for paragraph format in content fragment. Does anyone have any ideas about this?

Best answer by Tethich

Hi @rajkumarha1 

 

I believe this is what you need to do: https://lhotsetechnologies.com/blog/enable-rte-plugins-for-content-fragment/
Once you have the StyledTextEditor.js file in your codebase, you can tweak it as you need. I believe for the paragraphs you need to find this section and modify it:

// EDIT 1 - Defining formats "formats": { "p": "Paragraph", "h1": "Heading 1", "h2": "Heading 2", "h3": "Heading 3", "h4": "Heading 4", "h5": "Heading 5", "h6": "Heading 6", "blockquote": "Quote" }

 

3 replies

EstebanBustamante
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
April 8, 2025

Hi, 

This should work: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/configuring-rte-plugin-for-content-fragment-editor/m-p/230868

 

In case you want or need a new RTE plugin, you can use the extensibility framework to do that in the new UI experience, like this: 

https://developer.adobe.com/uix/docs/services/aem-cf-editor/api/rte-toolbar/#_blank 

 

Hope this helps

Esteban Bustamante
April 10, 2025

Hi 
I tried to override StyledTextEditor.js as per the solution provided here - https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/configuring-rte-plugin-for-content-fragment-editor/m-p/230868

 

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

to

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

But the code from /apps is not getting called at all. 

Can you please suggest if I might have missed something here.

Thanks

AdamBall-UoN
August 7, 2025

Hi Rajkumarha

 

I also had this issue, make sure you add the directory to the filter.xml so its picked up on the build

ui.apps/src/main/content/META-INF/vault/filter.xml

example file contents for filter.xml

<?xml version="1.0" encoding="UTF-8"?>
<workspaceFilter version="1.0">
<filter root="/apps/dam/cfm/admin/clientlibs"/>
</workspaceFilter>
Tethich
Community Advisor
TethichCommunity AdvisorAccepted solution
Community Advisor
April 8, 2025

Hi @rajkumarha1 

 

I believe this is what you need to do: https://lhotsetechnologies.com/blog/enable-rte-plugins-for-content-fragment/
Once you have the StyledTextEditor.js file in your codebase, you can tweak it as you need. I believe for the paragraphs you need to find this section and modify it:

// EDIT 1 - Defining formats "formats": { "p": "Paragraph", "h1": "Heading 1", "h2": "Heading 2", "h3": "Heading 3", "h4": "Heading 4", "h5": "Heading 5", "h6": "Heading 6", "blockquote": "Quote" }

 

kautuk_sahni
Community Manager
Community Manager
June 26, 2025

@rajkumarha1 Did you find the suggestions helpful? If you need more information, please let us know. If a response resolved your issue, kindly mark it as correct to help others in the future. Alternatively, if you discovered a solution on your own, we'd appreciate it if you could share it with the community. Thank you.

Kautuk Sahni