Add H4 in Content Fragment RichText Editor | Community
Skip to main content
Bhuwan_B
Community Advisor
Community Advisor
August 25, 2022
Solved

Add H4 in Content Fragment RichText Editor

  • August 25, 2022
  • 1 reply
  • 1243 views

The default paragraph formats are Paragraph, Heading 1, Heading 2, and Heading 3 (<p><h1><h2>, and <h3>). How can we enable <h4> in CF Richtext.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Bhuwan_B

I figured one way of achieving it, adding solutions that may help community members with similar use cases.

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

2. Overwrite paraformat at line number 51 inside defaultCFMRTEConfig with the below changes:

"paraformat": {
      "features": "*",
      "formats": {
        "p": "Paragraph",
        "h1": "Heading 1",
        "h2": "Heading 2",
        "h3": "Heading 3",
        "h4": "Heading 4"
      }
    },

 

1 reply

TarunKumar
Community Advisor
Community Advisor
August 25, 2022
Bhuwan_B
Community Advisor
Bhuwan_BCommunity AdvisorAuthor
Community Advisor
August 25, 2022

@tarunkumar Thanks for your reply but the ask is regarding Richtext plugins of Content Fragments not the regular touchui dialog.

Bhuwan_B
Community Advisor
Bhuwan_BCommunity AdvisorAuthorAccepted solution
Community Advisor
August 26, 2022

I figured one way of achieving it, adding solutions that may help community members with similar use cases.

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

2. Overwrite paraformat at line number 51 inside defaultCFMRTEConfig with the below changes:

"paraformat": {
      "features": "*",
      "formats": {
        "p": "Paragraph",
        "h1": "Heading 1",
        "h2": "Heading 2",
        "h3": "Heading 3",
        "h4": "Heading 4"
      }
    },