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
new BreadcrumbsView(locale?, __namedParameters?): BreadcrumbsView;Parameters
| Parameter | Type |
|---|---|
locale? | Locale |
__namedParameters? | BreadcrumbsViewOptions |
Returns
BreadcrumbsView
Overrides
View.constructor
Properties
isClickable
readonly isClickable: boolean;Whether the items are buttons that can be clicked, or labels.
items
readonly items: ViewCollection<
| BreadcrumbItemView
| BreadcrumbLabelView>;The breadcrumb items: the buttons or labels, from the outermost to the innermost one.
keystrokes
readonly keystrokes: KeystrokeHandler;Handles the keystrokes within the breadcrumbs.
Methods
destroy()
destroy(): void;Destroys the view and its keystroke handler.
Returns
void
Overrides
View.destroy
focus()
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
| Parameter | Type |
|---|---|
direction? | 1 | -1 |
Returns
void
render()
render(): void;Renders the view and starts handling the keystrokes.
Returns
void
Overrides
View.render
setItems()
setItems(items): void;Replaces the items.
Parameters
| Parameter | Type |
|---|---|
items | readonly BreadcrumbItem[] |
Returns
void