Multi-level lists
Export to Word supports converting multi-level lists. These lists are a way to organize information using a hierarchy, where main points have subpoints beneath them. Each level contains a reference to its parent level to underline the connection between them. Multi-level lists make it easier to see the relationship between ideas and are often used in outlines or detailed reports.
# The multi-level list format
Currently, only one type of multi-level lists is supported: the legal one. It is a special type of multi-level lists commonly used in legal documents to organize information systematically and clearly. These use Arabic numerals (1, 2, 3, etc.) exclusively to ensure consistency, readability, and ease of reference in contracts, statutes, or formal legal writing. Export to Word recognizes the format of legal lists used in CKEditor 5:
- The
ol
element is used to create a list. - The list has the
legal-list
class applied to it.
Example of converting an HTML document with a multi-level list:
<h2>List of human spacecraft</h2>
<ol class="multi-level-list legal-list" style="list-style-type: none">
<li>
<h2>
<span class="multi-level-list__marker">1. </span>American spacecraft
</h2>
<ol class="multi-level-list legal-list" style="list-style-type: none">
<li>
<h3>
<span class="multi-level-list__marker">1.1. </span>Manned
</h3>
<ol class="multi-level-list legal-list" style="list-style-type: none">
<li><span class="multi-level-list__marker">1.1.1. </span>Mercury</li>
<li><span class="multi-level-list__marker">1.1.2. </span>Gemini</li>
<li><span class="multi-level-list__marker">1.1.3. </span>Apollo</li>
<li>
<span class="multi-level-list__marker">1.1.4. </span>space shuttle
<ol
class="multi-level-list legal-list"
style="list-style-type: none"
>
<li>
<span class="multi-level-list__marker">1.1.4.1. </span>Columbia
</li>
<li>
<span class="multi-level-list__marker">1.1.4.2. </span
>Challenger
</li>
<li>
<span class="multi-level-list__marker">1.1.4.3. </span>Discovery
</li>
<li>
<span class="multi-level-list__marker">1.1.4.4. </span>Atlantis
</li>
<li>
<span class="multi-level-list__marker">1.1.4.5. </span>Endeavour
</li>
</ol>
</li>
<li><span class="multi-level-list__marker">1.1.5. </span>Dragon</li>
<li>
<span class="multi-level-list__marker">1.1.6. </span>New Sheppard
</li>
</ol>
</li>
</ol>
</li>
</ol>
The HTML sample listed above results in the following list in CKEditor 5:
Upon exporting, the resulting document is displayed by Word as follows: