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 | undefinedmodule:document-outline/documentoutline~DocumentOutlineConfig#containerThe container element for the document outline to render. This should be a reference to an existing container element in the DOM.
-
headings : Array<string> | undefinedmodule:document-outline/documentoutline~DocumentOutlineConfig#headingsAn 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( /* ... */ );Copy codeIf 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.optionsis 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 | undefinedmodule:document-outline/documentoutline~DocumentOutlineConfig#showEmptyHeadingsAllows 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.