Module

ui/toolbar/enabletoolbarkeyboardfocus

@ckeditor/ckeditor5-ui/src/toolbar/enabletoolbarkeyboardfocus

module

Filtering

Functions

  • enableToolbarKeyboardFocus( options = { options.origin, options.originKeystrokeHandler, options.originFocusTracker, options.toolbar, [options.beforeFocus], [options.afterBlur] } )

    Enables focus/blur toolbar navigation using Alt+F10 and Esc keystrokes.

    Parameters

    options : Object

    Options of the utility.

    Properties
    options.origin : *

    A view to which the focus will return when Esc is pressed and options.toolbar is focused.

    options.originKeystrokeHandler : KeystrokeHandler

    A keystroke handler to register Alt+F10 keystroke.

    options.originFocusTracker : FocusTracker

    A focus tracker for options.origin.

    options.toolbar : ToolbarView

    A toolbar which is to gain focus when Alt+F10 is pressed.

    [ options.beforeFocus ] : function

    A callback executed before the options.toolbar gains focus upon the Alt+F10 keystroke.

    [ options.afterBlur ] : function

    A callback executed after options.toolbar loses focus upon Esc keystroke but before the focus goes back to options.origin.