Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Configuring RTE in touch UI

ashishkhadpe
Level 3
Level 3

Hi All,

 

I want to configure my RTE in component dialog to show only p and h4 tags available for content author under paraformat. Any quick solution to achieve this?

 

I have below entry in RTEcofig : 

<format
jcr:primaryType="nt:unstructured"
features="*"/>

and in UISettings : 

 

<paraformat
jcr:primaryType="nt:unstructured"
items="paraformat:getFormats:paraformat-pulldown"
ref="paraformat"/>

 

 

1 Accepted Solution
Vishalverma
Correct answer by
Level 2
Level 2

try this in RTE config

<paraformat
     jcr:primaryType="nt:unstructured"
    features="*">
    <formats jcr:primaryType="nt:unstructured">
     <default_p
              jcr:primaryType="nt:unstructured"
              description="Paragraph"
              tag="p"/>
    <default_h4
              jcr:primaryType="nt:unstructured"
              description="Heading 4"
              tag="h4"/>
  </formats>
</paraformat>

View solution in original post

2 Replies
Vishalverma
Correct answer by
Level 2
Level 2

try this in RTE config

<paraformat
     jcr:primaryType="nt:unstructured"
    features="*">
    <formats jcr:primaryType="nt:unstructured">
     <default_p
              jcr:primaryType="nt:unstructured"
              description="Paragraph"
              tag="p"/>
    <default_h4
              jcr:primaryType="nt:unstructured"
              description="Heading 4"
              tag="h4"/>
  </formats>
</paraformat>

View solution in original post

BrianKasingli
Community Advisor
Community Advisor

@ashishkhadpe here's a Granite UI 1.0 (Touch UI) solution for your requirement:

BrianKasingli_1-1597507851195.png

 

<paraformat
    jcr:primaryType="nt:unstructured"
    sling:resourceType="cq/gui/components/authoring/dialog/richtext"
    fieldLabel="Paraformat Rich Text"
    name="./paraformat"
    required="true"
    useFixedInlineToolbar="{Boolean}true">
    <rtePlugins jcr:primaryType="nt:unstructured">
        <paraformat
            jcr:primaryType="nt:unstructured"
            features="*">
            <formats jcr:primaryType="cq:WidgetCollection">
                <paragraph
                    jcr:primaryType="cq:WidgetCollection"
                    description="Paragraph"
                    tag="p"/>
                <heading4
                    jcr:primaryType="cq:WidgetCollection"
                    description="Heading 4"
                    tag="h4"/>
            </formats>
        </paraformat>
    </rtePlugins>
    <uiSettings jcr:primaryType="nt:unstructured">
        <cui jcr:primaryType="nt:unstructured">
            <inline
                jcr:primaryType="nt:unstructured"
                toolbar="[#paraformat]">
                <popovers jcr:primaryType="nt:unstructured">
                    <paraformat
                        jcr:primaryType="nt:unstructured"
                        items="paraformat:getFormats:paraformat-pulldown"
                        ref="paraformat"/>
                </popovers>
            </inline>
            <dialogFullScreen
                jcr:primaryType="nt:unstructured"
                toolbar="[#paraformat]">
                <popovers jcr:primaryType="nt:unstructured">
                    <paraformat
                        jcr:primaryType="nt:unstructured"
                        items="paraformat:getFormats:paraformat-pulldown"
                        ref="paraformat"/>
                </popovers>
            </dialogFullScreen>
        </cui>
    </uiSettings>
</paraformat>