Richtext with Nested lists in RTE

Avatar

Avatar

Donny269

Avatar

Donny269

Donny269

29-10-2020

Hi everybody,

 

I'm getting the problem with creating nested list of richtext editor in AEM 6.5 is incorrect, the description as below :


Wrong nested list that I am getting :

   When I clicked on numbered list, it created an set of <ol> <li>, if I clicked on the indent button, the <li> element will be added a margin-left="40px", this is the wrong nested list :

Incorrect nested list.JPG

 

The correct nested list that I would like to :

   When user clicked on the indent button, it will create nested list inside of the current set, it will be like this:

Correct nested list.JPG

 

 

So could everybody know how to resolve this problem?

 

Thank you.

Nested lists in RTE

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831
Arun_Patidar
MVP

29-10-2020

Hi,

I tried with core component , it works as expected.

 

Arun_Patidar_0-1604001130590.png

 

Arun_Patidar_1-1604001276881.png

 

 

Answers (1)

Answers (1)

Avatar

Avatar

Anudeep_Garnepudi

Avatar

Anudeep_Garnepudi

Anudeep_Garnepudi

01-11-2020

Hi @Donny269 

Check your Rich Text using cq/gui/components/authoring/dialog/richtext widget or not. If not try updating it. If you are using the same, please share your dialog.xml including RTE plugin.

AG

Hi @Anudeep_Garnepudi, I am using AEM cloud version.
Here is my dialog xml file :

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:granite="http://www.adobe.com/jcr/granite/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
jcr:primaryType="nt:unstructured"
jcr:title="Richtext"
sling:resourceType="cq/gui/components/authoring/dialog">
<content
granite:class="test-richtext"
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container"
margin="{Boolean}true">
<items jcr:primaryType="nt:unstructured">
<richtext
jcr:primaryType="nt:unstructured"
sling:resourceType="cq/gui/components/authoring/dialog/richtext"
externalStyleSheets="[/etc.clientlibs/test/clientlibs/clientlib-site.css,/etc.clientlibs/test/clientlibs/clientlib-authoring.css]"
name="./richtext"
useFixedInlineToolbar="{Boolean}true">
<rtePlugins jcr:primaryType="nt:unstructured">
<format
jcr:primaryType="nt:unstructured"
features="bold,italic,underline"/>
<justify
jcr:primaryType="nt:unstructured"
features="*"/>
<links
jcr:primaryType="nt:unstructured"
features="modifylink,unlink"/>
<lists
jcr:primaryType="nt:unstructured"
features="*"/>
<misctools
jcr:primaryType="nt:unstructured"
features="specialchars">
<specialCharsConfig jcr:primaryType="nt:unstructured">
<chars jcr:primaryType="nt:unstructured">
<hr
jcr:primaryType="nt:unstructured"
entity="&lt;hr>"
name="Horizontal Rule"/>
<copyright
jcr:primaryType="nt:unstructured"
entity="&amp;copy;"
name="copyright"/>
<emDash
jcr:primaryType="nt:unstructured"
entity="&amp;#8212;"
name="emDash"/>
<euro
jcr:primaryType="nt:unstructured"
entity="&amp;euro;"
name="euro"/>
<registered
jcr:primaryType="nt:unstructured"
entity="&amp;reg;"
name="registered"/>
<trademark
jcr:primaryType="nt:unstructured"
entity="&amp;trade;"
name="trademark"/>
</chars>
</specialCharsConfig>
</misctools>
<paraformat
jcr:primaryType="nt:unstructured"
features="*">
<formats jcr:primaryType="nt:unstructured">
<h1
jcr:primaryType="nt:unstructured"
description="Heading 1"
tag="h1"/>
<h2
jcr:primaryType="nt:unstructured"
description="Heading 2"
tag="h2"/>
<h3
jcr:primaryType="nt:unstructured"
description="Heading 3"
tag="h3"/>
<h4
jcr:primaryType="nt:unstructured"
description="Heading 4"
tag="h4"/>
<h5
jcr:primaryType="nt:unstructured"
description="Heading 5"
tag="h5"/>
<h6
jcr:primaryType="nt:unstructured"
description="Heading 6"
tag="h6"/>
<p
jcr:primaryType="nt:unstructured"
description="Paragraph"
tag="p"/>
<blockquote
jcr:primaryType="nt:unstructured"
description="Quote"
tag="blockquote"/>
</formats>
</paraformat>
<styles
jcr:primaryType="nt:unstructured"
features="*">
<styles jcr:primaryType="cq:WidgetCollection">
<legaltext
jcr:primaryType="nt:unstructured"
cssName="test-richtext__legal-text"
text="Legal Text Font Size"/>
<mobileonly
jcr:primaryType="nt:unstructured"
cssName="u-mobile-only"
text="Mobile Only"/>
<desktoponly
jcr:primaryType="nt:unstructured"
cssName="u-desktop-only"
text="Desktop Only"/>
<strikethrough
jcr:primaryType="nt:unstructured"
cssName="u-strikethrough"
text="Strikethrough"/>
</styles>
</styles>
<undo
jcr:primaryType="nt:unstructured"
features="*"/>
<tracklinks
jcr:primaryType="nt:unstructured"
features="*"/>
<subsuperscript
jcr:primaryType="nt:unstructured"
features="superscript"/>
<edit
jcr:primaryType="nt:unstructured"
defaultPasteMode="wordhtml">
<htmlPasteRules
jcr:primaryType="nt:unstructured"
allowBlockTags="[h1,h2,h3,h4,h5,h6,hr]"/>
</edit>
</rtePlugins>
<uiSettings jcr:primaryType="nt:unstructured">
<cui jcr:primaryType="nt:unstructured">
<inline
jcr:primaryType="nt:unstructured"
toolbar="[#styles,format#bold,format#italic,format#underline,#justify,#lists,links#modifylink,links#unlink,misctools#specialchars,#paraformat,subsuperscript#superscript,-,undo#undo,undo#redo,-]">
<popovers jcr:primaryType="nt:unstructured">
<styles
jcr:primaryType="nt:unstructured"
items="styles:getStyles:styles-pulldown"
ref="styles"/>
<justify
jcr:primaryType="nt:unstructured"
items="[justify#justifyleft,justify#justifycenter,justify#justifyright]"
ref="justify"/>
<lists
jcr:primaryType="nt:unstructured"
items="[lists#unordered,lists#ordered,lists#outdent,lists#indent]"
ref="lists"/>
<misctools
jcr:primaryType="nt:unstructured"
items="[misctools#specialchars]"
ref="misctools"/>
<paraformat
jcr:primaryType="nt:unstructured"
items="paraformat:getFormats:paraformat-pulldown"
ref="paraformat"/>
</popovers>
</inline>
</cui>
</uiSettings>
</richtext>
</items>
</content>
</jcr:root>