CKEDITOR.plugins.balloontoolbar.context
A class representing a single balloon toolbar context in the editor.
It can be configured with various conditions for showing up the toolbar using the options
parameter.
Multiple contexts are handled by the context manager.
Filtering
Properties
-
editor : editor
CKEDITOR.plugins.balloontoolbar.context#editor
An editor instance.
-
options : contextDefinition
CKEDITOR.plugins.balloontoolbar.context#options
Options passed to the constructor.
-
toolbar : balloonToolbar
CKEDITOR.plugins.balloontoolbar.context#toolbar
Toolbar instance pointed by context.
Methods
-
since 4.8.0
constructor( editor, options ) → context
CKEDITOR.plugins.balloontoolbar.context#constructor
Creates a balloon toolbar context instance.
Parameters
editor : editor
The editor instance for which the toolbar is created.
options : contextDefinition
A set of options defining the context behavior.
Returns
context
-
destroy()
CKEDITOR.plugins.balloontoolbar.context#destroy
Destroys the toolbar maintained by this context.
-
hide()
CKEDITOR.plugins.balloontoolbar.context#hide
Hides the toolbar controlled by this context.
-
refresh()
CKEDITOR.plugins.balloontoolbar.context#refresh
Refreshes the toolbar state attached to this context.
-
show( [ pointedElement ] )
CKEDITOR.plugins.balloontoolbar.context#show
Shows the toolbar controlled by this context.
Parameters
[ pointedElement ] : element
An element that should be pointed by the balloon toolbar.
-
Loads a button from
options.buttons
. -
Checks if a given
element
matches theoptions.cssSelector
selector.Parameters
elem : element
An element to be tested.
Returns
element | null
CKEDITOR.dom.element instance if an element was matched,
null
otherwise.
-
private
_matchRefresh( path, selection ) → element | null
CKEDITOR.plugins.balloontoolbar.context#_matchRefresh
Performs matching against
options.refresh
.Parameters
path : elementPath
The element path to be checked.
selection : selection
The selection object to be passed to the
refresh
function.
Returns
element | null
Returns a CKEDITOR.dom.element if matched by
options.refresh
,null
otherwise.
-
Checks if any of the
options.widgets
widgets is currently focused.Returns
element | null
Returns a CKEDITOR.dom.element instance that the toolbar should point to if any matched widget is focused. Returns
false
otherwise, which means that no tracked widget was matched.