DocumentOutlineTableOfContentsConfig
interface
The configuration of the table of contents feature.
ClassicEditor
.create( {
plugins: [ TableOfContents, /* ... */ ],
tableOfContents: {
headings: [ 'heading1', 'heading2' ]
}
} )
.then( /* ... */ )
.catch( /* ... */ );
Copy code
See all editor options.
Properties
headings : Array<string> | undefinedmodule:document-outline/tableofcontents~DocumentOutlineTableOfContentsConfig#headingsAn ordered array of model heading element names to include in the table of contents.
When set, only headings matching these names are rendered in the ToC widget, independently of
documentOutline.headings.The index of the heading in the array reflects the heading nesting level in the table of contents.
ClassicEditor .create( { plugins: [ TableOfContents, /* ... */ ], tableOfContents: { headings: [ 'heading1', 'heading2' ] } } ) .then( /* ... */ ) .catch( /* ... */ );Copy codeWhen not set, the ToC inherits headings from
DocumentOutlineUtils(the existing default behavior).