DocumentOutlineConfig
The configuration of the document outline feature.
ClassicEditor
.create( editorElement, {
documentOutline: ... // Document outline feature configuration.
} )
.then( /* ... */ )
.catch( /* ... */ );
See all editor options.
Properties
-
container : HTMLElement | undefined
module:document-outline/documentoutline~DocumentOutlineConfig#container
The container element for the document outline to render. This should be a reference to an existing container element in the DOM.
-
headings : Array<string> | undefined
module:document-outline/documentoutline~DocumentOutlineConfig#headings
An array of model element names considered as headings in the document outline.
The index of the heading in the array reflects the heading nesting level. It can be used e.g. for reducing the number of visible headings.
ClassicEditor .create( editorElement, { plugins: [ DocumentOutline, /* ... */ ], documentOutline: { headings: [ 'heading1', 'heading2', /* ... */ ], // ... } } ) .then( /* ... */ ) .catch( /* ... */ );
If this configuration is not defined, the feature will use the following defaults instead:
- If the Headings feature is loaded, it equals
config.heading.options
.[ 'heading1', 'heading2', 'heading3' ]
ifconfig.heading.options
is not defined.
- If the General HTML Support feature is loaded, it equals
[ 'htmlH1', 'htmlH2', 'htmlH3', 'htmlH4', 'htmlH5', 'htmlH6' ]
.
Note: The Headings feature takes precedence over the General HTML Support feature when both are loaded.
-
showEmptyHeadings : boolean | undefined
module:document-outline/documentoutline~DocumentOutlineConfig#showEmptyHeadings
Allows you to display a placeholder text: [Empty heading] for empty headings.
By default, the display of a placeholder is disabled. To enable it, set this parameter to true.
Note: This setting also affects Table of contents feature.