Sign up (with export icon)

DocumentOutlineConfig

Api-interface icon interface

The configuration of the document outline feature.

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

See all editor options.

Properties

  • Chevron-right icon

    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.

  • Chevron-right icon

    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( /* ... */ );
    
    Copy code

    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.

  • Chevron-right icon

    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.