# BookmarkConfig

interface

The configuration of the bookmark feature.

The properties defined in this config are set in the `config.bookmark` namespace.

```typescript
ClassicEditor
	.create( {
		bookmark: {
			// Bookmark configuration.
		}
	} )
	.then( ... )
	.catch( ... );
```

See [all editor options](module_core_editor_editorconfig-EditorConfig.md).

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-bookmark/src/bookmarkconfig.ts#L28)

<a id="properties">

## Properties

<a id="member-enableNonEmptyAnchorConversion">

### `enableNonEmptyAnchorConversion?: boolean`

Allows to convert into bookmarks non-empty anchor elements.

With this option enabled you will have all non-empty anchors converted into bookmakrs. For example:

```html
<a id="bookmark">Bookmark</a>
```

will be converted into:

```html
<a id="bookmark"></a>Bookmark
```

**Note:** This is enabled by default.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-bookmark/src/bookmarkconfig.ts#L50)

Defaults to `true`

<a id="member-toolbar">

### `toolbar?: Array<string>`

Items to be placed in the bookmark contextual toolbar.

Assuming that you use the [`BookmarkUI`](module_bookmark_bookmarkui-BookmarkUI.md) feature, the following toolbar items will be available in [`ComponentFactory`](module_ui_componentfactory-ComponentFactory.md):

* `'bookmarkPreview'`,
* `'editBookmark'`,
* `'removeBookmark'`.

The default configuration for bookmark toolbar is:

```typescript
const bookmarkConfig = {
	toolbar: [ 'bookmarkPreview', '|', 'editBookmark', 'removeBookmark' ]
};
```

Of course, the same buttons can also be used in the [main editor toolbar](module_core_editor_editorconfig-EditorConfig.md#member-toolbar).

Read more about configuring the toolbar in [`toolbar`](module_core_editor_editorconfig-EditorConfig.md#member-toolbar).

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-bookmark/src/bookmarkconfig.ts#L75)

---

Full index of the CKEditor 5 API reference: [llms.txt](llms.txt)
