Skip to main content

2 replies

migac_jurica
Level 1
May 14, 2026

This would be component specific styles on how to style <ol></ol> in the component.

You can insert it into the dialog as follows.
 

<text
jcr:primaryType="nt:unstructured"
sling:resourceType="cq/gui/components/authoring/dialog/richtext"
name="./text"
fieldLabel="Text"
useFixedInlineToolbar="{Boolean}true">

<rtePlugins jcr:primaryType="nt:unstructured">
<format
jcr:primaryType="nt:unstructured"
features="[bold,italic,underline]"/>
<lists
jcr:primaryType="nt:unstructured"
features="[ordered,unordered,indent,outdent]"/>
<links
jcr:primaryType="nt:unstructured"
features="[modifylink,unlink]"/>
</rtePlugins>

<uiSettings jcr:primaryType="nt:unstructured">
<cui jcr:primaryType="nt:unstructured">
<inline
jcr:primaryType="nt:unstructured"
toolbar="[format#bold,format#italic,format#underline,#lists,links#modifylink,links#unlink]">
<popovers jcr:primaryType="nt:unstructured">
<lists
jcr:primaryType="nt:unstructured"
items="[lists#unordered,lists#ordered,lists#outdent,lists#indent]"
ref="lists"/>
</popovers>
</inline>

<dialogFullScreen
jcr:primaryType="nt:unstructured"
toolbar="[format#bold,format#italic,format#underline,lists#unordered,lists#ordered,lists#outdent,lists#indent,links#modifylink,links#unlink]"/>
</cui>
</uiSettings>
</text>

The key parts are:

<lists
jcr:primaryType="nt:unstructured"
features="[ordered,unordered,indent,outdent]" />

 

Level 2
May 14, 2026

Hi ​@ShikhaSo6 ,


Great start from migac_jurica on enabling the lists plugin in the dialog that's the right first step to get ordered/unordered list controls in the RTE toolbar.

 

However, to achieve the specific styled numbered list format in your reference image (larger numbers, custom spacing, distinct font treatment), you'll also need component-level CSS targeting the rendered `<ol>` output. The RTE plugin config only enables the feature the visual styling is handled separately.

 

In your component's CSS file, target the RTE output like this:

.your-component .cmp-text ol {
    list-style: none;
    counter-reset: custom-counter;
    padding-left: 0;
}

.your-component .cmp-text ol li {
    counter-increment: custom-counter;
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 12px;
}

.your-component .cmp-text ol li::before {
    content: counter(custom-counter);
    font-size: 1.25rem;
    font-weight: 700;
    color: #your-brand-color;
    min-width: 24px;
    flex-shrink: 0;
}

 

A few things to note for AEM specifically:

1. If you're using Core Components Text component, the rendered markup wraps in `.cmp-text` scope your styles there to avoid bleeding into other RTE instances on the page.

2. If this styled list is only needed in specific components (not site-wide), keep the CSS in that component's clientlib rather than the global styles.

3. If authors need to toggle between a standard list and this styled format, consider creating a custom RTE style via the `paraformat` or `styles` plugin so they can apply it from the toolbar rather than having all `<ol>` elements styled this way globally.


Happy to show the styles plugin config for that last option if useful.