Lists in content change the succeeding element to <div>, from <p> | Content Fragment | Rich text multifield bug |
Hi All!
I could not find any information about this bug on the forum and the internet. Probably because it is hard to describe, but here we go.
I'm developing custom Content Fragments in AEM.
I have a custom Content Fragment Model, with couple of different fields.
When I use Multi Line Text Field with Rich text as the default-mime-type(default editor view) in the CF Model definition, inserting <ul> and <ol> list in that text field, in the Content Fragment, makes the next piece of content a <div> rather than a standard <p>.
It seams to be a bug, but I might be wrong. I hope also that this is the correct place to post/ask.
Please find an example below.
- The last line in the Text Content : <div>12wqrqrwerwqrweqrwqer<br></div>
- Usually when next line is started in Rich Text Editor it is a <p> rather than a <div> like in this example.
- This happens for all fields that have the same type.
View of the Content Fragment editor:

Field Content read from the Content Fragment:
"<p>Aenean pulvinar mattis ultricies. Duis suscipit orci sit amet erat commodo, ornare porta est facilisis.</p>
<ul>
<li>Integer mattis est enim, ut<br></li>
<li>lacinia dolor mollis vitae.<br></li>
<li>Nullam vitae justo in augue ullamcorper consequat ac sit amet ante.<br></li>
<li>Maecenas non nulla et augue consequat convallis imperdiet vel orci. In accumsan vestibulum mi, in ornare magna
facilisis at. Morbi vulputate lectus eros, quis accumsan risus sagittis eget. Mauris mauris elit, dignissim eu
finibus et, aliquet quis ante. Phasellus a sollicitudin mauris. Etiam placerat, nibh a consequat porta, sem
lorem congue arcu, non venenatis ligula urna nec sapien. Sed pretium efficitur aliquam. Maecenas euismod
pharetra pretium.</li>
</ul>
<div>12wqrqrwerwqrweqrwqer<br></div>"
Text field setup in Content Fragment Model:
<about-this-product-content
jcr:primaryType="nt:unstructured"
sling:resourceType="dam/cfm/admin/components/authoring/contenteditor/multieditor"
cfm-element="About This Product - Content"
default-mime-type="text/html"
fieldDescription="Bla Bla Bla"
listOrder="2"
metaType="text-multi"
name="about-this-product-content"
renderReadOnly="false"
showEmptyInReadOnly="true"
valueType="string"/>