Interface

DocumentOutlineConfig (document-outline)

@ckeditor/ckeditor5-document-outline/src/documentoutline

interface

The configuration of the document outline feature.

ClassicEditor
	.create( editorElement, {
		documentOutline:  ... // Document outline feature configuration.
	} )
	.then( /* ... */ )
	.catch( /* ... */ );

See all editor options.

Filtering

Properties

  • container : HTMLElement | undefined

    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

    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:

    1. If the Headings feature is loaded, it equals
    1. 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

    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.