CKFinder.Models.ToolbarItem
Hierarchy
Backbone.ModelCKFinder.Models.ToolbarItem
Toolbar item class describes toolbar items that are added to the toolbar on any
CKFinder.Application.toolbar:reset:NAME:EVENT event.
A toolbar item model extends Backbone.Model. To access its attributes, use the
toolbarItem.get( "attributeName" )
method or use toolbarItem.set( "attributeName", "value" )
to alter its attributes.
There are 3 types of toolbar items:
button
– A standard button which can trigger some action.text
– Displays a text message in the toolbar.custom
– Displays anyMarionette.View
instance in the toolbar.
Properties
A function to be invoked when a button is clicked. Used by the button
type.
Toolbar placement gravity. Toolbar items are aligned either to the primary
side (left in LTR text direction) or the secondary
side (right in LTR text direction).
Defaults to: 'primary'
If set to true
, an item will always be rendered – it will not be hidden on small screens.
Defaults to: false
Additional DOM attributes to be put on the toolbar button DOM object. Used by the button
type.
Additional CSS class names to be put on a toolbar item. Used by the button
and text
type.
An optional name of the toolbar button icon class without 'ui-icon-'
part.
For icon class 'ui-icon-ckf-view'
pass 'ckf-view'
only. Used by the button
type.
If set to true
, a toolbar button will be rendered without the label. Used by the button
type.
Defaults to: false
Set to true
to make a toolbar item render as disabled. Used by the button
and text
type.
Defaults to: false
An optional title of a toolbar button. Used by the button
and text
type.
Toolbar placement priority. The higher priority, the closer an item will be placed to its gravity.
For instance for toolbar items with priority=20
and priority=30
and alignment=primary
, the toolbar item with priority=30
will be placed as the first item from left (in LTR text direction).
A view instance that should be rendered as a toolbar item. Used by the custom
type.