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.
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
-
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.
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.
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.
To use this premium feature, you need to activate it with proper credentials. Refer to the License key and activation guide for details.
- 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.
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.