Expand my Community achievements bar.

Join expert-led, customer-led sessions on Adobe Experience Manager Assets on August 20th at our Skill Exchange.
SOLVED

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

Avatar

Level 1

Hi 

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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

 

View solution in original post

4 Replies

Avatar

Community Advisor and Adobe Champion

Hi, 

This should work: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/configuring-rte-plugin-for...

 

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

Avatar

Level 1

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

 

/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

Avatar

Correct answer by
Community Advisor

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

 

Avatar

Administrator

@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