Multi-level lists
Multi-level lists with the legal style numbering feature allows for easy creation and modification of numbered lists with counters (1, 1.1, 1.1.1). These are crucial for clear referencing and hierarchical organization in complex documents. The feature offers full compatibility with Microsoft Word. When lists with such formatting are pasted to the editor with the paste from Office enhanced feature, the numbering format is retained.
Unlock this feature with a CKEditor Paid Plan. Sign up for a free trial, or select the Plan that provides access to all the premium features you need.
# Demo
List of human spacecraft
-
1. American spacecraft
-
1.1. Manned
- 1.1.1. Mercury
- 1.1.2. Gemini
- 1.1.3. Apollo
-
1.1.4. space shuttle
- 1.1.4.1. Columbia
- 1.1.4.2. Challenger
- 1.1.4.3. Discovery
- 1.1.4.4. Atlantis
- 1.1.4.5. Endeavour
- 1.1.5. Dragon
- 1.1.6. New Sheppard
-
1.2. Cargo
- 1.2.1. Dragon
- 1.2.2. Cygnus
-
-
2. Soviet (and Russian) spacecraft
-
2.1. Manned
- 2.1.1. Vostok
- 2.1.2. Voskhod
-
2.1.3. Soyuz
- 2.1.3.1. 7K-OK
- 2.1.3.2. 7K-T
- 2.1.3.3. Soyuz T
- 2.1.3.4. Soyuz TM
- 2.1.3.5. Soyuz TMA
- 2.1.3.6. Soyuz MS
-
2.2. Cargo
-
2.2.1. Progress
- 2.2.1.1. Progress
- 2.2.1.2. Progress M
-
2.2.1. Progress
-
-
3. Chinese spacecraft
-
3.1. Manned
- 3.1.1. Shenzhou
-
3.2. Cargo
- 3.2.1. Tianzhou
-
This demo presents a limited set of features. Visit the feature-rich editor example to see more in action.
# Additional feature information
# Headings in multi-level lists
Multi-level lists support headings in list items. The marker, which denotes the counter, will insert itself into the heading block to achieve more similar styles.
While creation of a legal document with a list of numbered headings is possible, the editing of long-form documents may not be the best experience. You might want full support for the numbered headings feature that Microsoft Word places in the multi-level lists interface. We do not have it yet, but if you are interested, please let us know in this GitHub issue or via our support.
# Custom multi-level list styles
For now, we provide one style for multi-level lists: legal style numbering. But this first step opens a possibility for us to add more styles in the future or allow integrators to create their own styles. If you are interested, please let us know in this GitHub issue or via our support.
# Installation
⚠️ New import paths
Starting with version 42.0.0, we changed the format of import paths. This guide uses the new, shorter format. Refer to the Packages in the legacy setup guide if you use an older version of CKEditor 5.
Please note that this plugin requires the basic List
plugin to work properly.
After installing the editor, add the features to your plugin list and toolbar configuration:
import { List } from 'ckeditor5';
import { MultiLevelList } from 'ckeditor5-premium-features';
ClassicEditor
.create( document.querySelector( '#editor' ), {
licenseKey: '<YOUR_LICENSE_KEY>',
plugins: [ List, MultiLevelList, /* ... */ ],
toolbar: [ 'multiLevelList', /* ... */ ]
} )
.then( /* ... */ )
.catch( /* ... */ );
Read more about installing plugins and toolbar configuration.
# Activating the feature
To use this premium feature, you need to activate it with proper credentials. Refer to the License key and activation guide for details.
# Related features
- Ordered and unordered lists – Create ordered and unordered lists with configurable markers.
- To-do lists – Create a list of interactive checkboxes with labels.
- Block indentation – Set indentation for text blocks such as paragraphs or headings and lists.
- Paste from Office enhanced – Paste Office documents with high compatibility.
# Common API
The MultiLevelList
registers:
- The
'multiLevelList'
UI dropdown component. - The
'multiLevelList'
command implemented byMultiLevelListCommand
.
You can execute the command using the editor.execute()
method:
// Change selected content to multi level list.
editor.execute( 'multiLevelList' );
We recommend using the official CKEditor 5 inspector for development and debugging. It will give you tons of useful information about the state of the editor such as internal data structures, selection, commands, and many more.
Every day, we work hard to keep our documentation complete. Have you spotted outdated information? Is something missing? Please report it via our issue tracker.
With the release of version 42.0.0, we have rewritten much of our documentation to reflect the new import paths and features. We appreciate your feedback to help us ensure its accuracy and completeness.