BookmarkConfig
interface
The configuration of the bookmark feature.
The properties defined in this config are set in the config.bookmark namespace.
ClassicEditor
.create( {
bookmark: {
// Bookmark configuration.
}
} )
.then( ... )
.catch( ... );Copy codeSee all editor options.
Properties
enableNonEmptyAnchorConversion?: booleanmodule:bookmark/bookmarkconfig~BookmarkConfig#enableNonEmptyAnchorConversionAllows to convert into bookmarks non-empty anchor elements.
With this option enabled you will have all non-empty anchors converted into bookmakrs. For example:
Copy code<a id="bookmark">Bookmark</a>will be converted into:
Copy code<a id="bookmark"></a>BookmarkNote: This is enabled by default.
Defaults to
truetoolbar?: Array<string>module:bookmark/bookmarkconfig~BookmarkConfig#toolbarItems to be placed in the bookmark contextual toolbar.
Assuming that you use the
BookmarkUIfeature, the following toolbar items will be available inComponentFactory:'bookmarkPreview','editBookmark','removeBookmark'.
The default configuration for bookmark toolbar is:
Copy codeconst bookmarkConfig = { toolbar: [ 'bookmarkPreview', '|', 'editBookmark', 'removeBookmark' ] };Of course, the same buttons can also be used in the main editor toolbar.
Read more about configuring the toolbar in
toolbar.