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 : editorCKEDITOR.plugins.balloontoolbar.context#editorAn editor instance.
options : contextDefinitionCKEDITOR.plugins.balloontoolbar.context#optionsOptions passed to the constructor.
toolbar : balloonToolbarCKEDITOR.plugins.balloontoolbar.context#toolbarToolbar instance pointed by context.
Methods
since 4.8.0
constructor( editor, options ) → contextCKEDITOR.plugins.balloontoolbar.context#constructorCreates a balloon toolbar context instance.
Parameters
editor : editorThe editor instance for which the toolbar is created.
options : contextDefinitionA set of options defining the context behavior.
Returns
context
destroy()CKEDITOR.plugins.balloontoolbar.context#destroyDestroys the toolbar maintained by this context.
hide()CKEDITOR.plugins.balloontoolbar.context#hideHides the toolbar controlled by this context.
refresh()CKEDITOR.plugins.balloontoolbar.context#refreshRefreshes the toolbar state attached to this context.
show( [ pointedElement ] )CKEDITOR.plugins.balloontoolbar.context#showShows the toolbar controlled by this context.
Parameters
[ pointedElement ] : elementAn element that should be pointed by the balloon toolbar.
Loads a button from
options.buttons.Checks if a given
elementmatches theoptions.cssSelectorselector.Parameters
elem : elementAn element to be tested.
Returns
element | nullCKEDITOR.dom.element instance if an element was matched,
nullotherwise.private
_matchRefresh( path, selection ) → element | nullCKEDITOR.plugins.balloontoolbar.context#_matchRefreshPerforms matching against
options.refresh.Parameters
path : elementPathThe element path to be checked.
selection : selectionThe selection object to be passed to the
refreshfunction.Returns
element | nullReturns a CKEDITOR.dom.element if matched by
options.refresh,nullotherwise.Checks if any of the
options.widgetswidgets is currently focused.Returns
element | nullReturns a CKEDITOR.dom.element instance that the toolbar should point to if any matched widget is focused. Returns
falseotherwise, which means that no tracked widget was matched.