Skip to main content
Apr 8, 2025 10:18 AM UTC
Solved

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

Hi 

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Tethich
TethichAccepted solution
Community Advisor
Apr 8, 2025 2:08 PM UTC

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" }

 

5 replies

EstebanBustamante
Adobe Champion and Community Advisor
Adobe Champion and Community Advisor
Apr 8, 2025 1:44 PM UTC

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

Translate
Esteban Bustamante
Apr 10, 2025 11:35 AM UTC

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

Translate
AdamBall-UoN
New Member
Aug 7, 2025 10:41 AM UTC

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>
Translate
Tethich
Community Advisor
TethichCommunity AdvisorAccepted solution
Community Advisor
Apr 8, 2025 2:08 PM UTC

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" }

 

Translate
kautuk_sahni
Level 9
Jun 26, 2025 12:46 PM UTC

@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.

Translate
Kautuk Sahni