Expand my Community achievements bar.

SOLVED

Add H4 in Content Fragment RichText Editor

Avatar

Community Advisor

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.

Bhuwan_B_0-1661406605105.png

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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

 

View solution in original post

3 Replies

Avatar

Community Advisor

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

Avatar

Correct answer by
Community Advisor

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