Skip to content

ckeditor5-elements / BreadcrumbsView

Class: BreadcrumbsView ​

Shows a path of elements, from the outermost to the innermost one, as a list (<ol>) in a <nav> landmark: buttons when the items can be clicked, labels otherwise. Items without a model element (list items) are labels too. The innermost item is marked with aria-current="location".

The left and right arrows move the focus between the items; past the first or the last one, they are left to the toolbar the view is in. Fires execute with the item when one of the buttons is clicked.

Extends ​

Constructors ​

Constructor ​

ts
new BreadcrumbsView(locale?, __namedParameters?): BreadcrumbsView;

Parameters ​

ParameterType
locale?Locale
__namedParameters?BreadcrumbsViewOptions

Returns ​

BreadcrumbsView

Overrides ​

View.constructor

Properties ​

isClickable ​

ts
readonly isClickable: boolean;

Whether the items are buttons that can be clicked, or labels.


items ​

ts
readonly items: ViewCollection<
  | BreadcrumbItemView
| BreadcrumbLabelView>;

The breadcrumb items: the buttons or labels, from the outermost to the innermost one.


keystrokes ​

ts
readonly keystrokes: KeystrokeHandler;

Handles the keystrokes within the breadcrumbs.

Methods ​

destroy() ​

ts
destroy(): void;

Destroys the view and its keystroke handler.

Returns ​

void

Overrides ​

View.destroy


focus() ​

ts
focus(direction?): void;

Focuses an item: the first one when the focus moves forward (1, e.g. from the previous toolbar item), the innermost one otherwise.

Parameters ​

ParameterType
direction?1 | -1

Returns ​

void


render() ​

ts
render(): void;

Renders the view and starts handling the keystrokes.

Returns ​

void

Overrides ​

View.render


setItems() ​

ts
setItems(items): void;

Replaces the items.

Parameters ​

ParameterType
itemsreadonly BreadcrumbItem[]

Returns ​

void