dojox/editor/plugins/StatusBar (version 1.10)

dijit/_editor/_Plugin

Summary

This plugin provides StatusBar capability to the editor. Basically a footer bar where status can be published. It also puts a resize handle on the status bar, allowing you to resize the editor via mouse.

Usage

var foo = new StatusBar(args);
dijit/_editor/_Plugin
Parameter Type Description
args Object
Optional

Initial settings for any of the attributes.

See the dojox/editor/plugins/StatusBar reference documentation for more information.

Property Summary

  • buttonPointer to dijit/form/Button or other widget (ex: dijit/form/FilteringSelect) that is added to the toolbar to control this plugin.
  • commandString like "insertUnorderedList", "outdent", "justifyCenter", etc. that represents an editor command.
  • disabledFlag to indicate if this plugin has been disabled and should do nothing helps control button state, among other things.
  • editorPoints to the parent editor
  • iconClassPrefixThe CSS class name for the button node is formed from iconClassPrefix and command
  • resizerFlag indicating that a resizer should be shown or not.
  • statusBarThe status bar and resizer.
  • useDefaultCommandIf true, this plugin executes by calling Editor.execCommand() with the argument specified in command.

Method Summary

  • _getAttrNames(name) Helper function for get() and set().
  • _getValueAttr() Over-ride to get the value of the status bar from the widget.
  • _initButton() Initialize the button or other widget that will control this plugin.
  • _set(name,value) Helper function to set new value for specified attribute
  • _setDisabledAttr(disabled) Function to set the plugin state and call updateState to make sure the button is updated appropriately.
  • _setValueAttr(str) Over-ride to set the value of the status bar from the widget.
  • _StatusBar()
  • buttonClass() Class of widget (ex: dijit.form.Button or dijit/form/FilteringSelect) that is added to the toolbar to control this plugin.
  • connect(o,f,tf) Deprecated.
  • destroy() Over-ride to clean up the breadcrumb toolbar.
  • get(attr) Quick and dirty implementation of 'get' pattern
  • getLabel(key) Returns the label to use for the button
  • own() Track specified handles and remove/destroy them when this instance is destroyed, unless they were already removed/destroyed manually.
  • set(attr,val) Quick and dirty implementation of 'set' pattern
  • setEditor(editor) Over-ride for the setting of the editor.
  • setToolbar(toolbar) Tell the plugin to add it's controller widget (often a button) to the toolbar.
  • updateState() Change state of the plugin to respond to events in the editor.

Properties

button
Defined by: dijit/_editor/_Plugin

Pointer to dijit/form/Button or other widget (ex: dijit/form/FilteringSelect) that is added to the toolbar to control this plugin. If not specified, will be created on initialization according to buttonClass

command
Defined by: dijit/_editor/_Plugin

String like "insertUnorderedList", "outdent", "justifyCenter", etc. that represents an editor command. Passed to editor.execCommand() if useDefaultCommand is true.

disabled
Defined by: dijit/_editor/_Plugin

Flag to indicate if this plugin has been disabled and should do nothing helps control button state, among other things. Set via the setter api.

editor
Defined by: dijit/_editor/_Plugin

Points to the parent editor

iconClassPrefix
Defined by: dijit/_editor/_Plugin

The CSS class name for the button node is formed from iconClassPrefix and command

resizer

Flag indicating that a resizer should be shown or not. Default is true. There are cases (such as using center pane border container to autoresize the editor That a resizer is not valued.

statusBar

The status bar and resizer.

useDefaultCommand
Defined by: dijit/_editor/_Plugin

If true, this plugin executes by calling Editor.execCommand() with the argument specified in command.

Methods

_getAttrNames(name)

Helper function for get() and set(). Caches attribute name values so we don't do the string ops every time.

Parameter Type Description
name undefined
Returns:undefined | object
_getValueAttr()

Over-ride to get the value of the status bar from the widget.

Returns:undefined
_initButton()

Initialize the button or other widget that will control this plugin. This code only works for plugins controlling built-in commands in the editor.

_set(name,value)

Helper function to set new value for specified attribute

Parameter Type Description
name String
value anything
_setDisabledAttr(disabled)

Function to set the plugin state and call updateState to make sure the button is updated appropriately.

Parameter Type Description
disabled undefined
_setValueAttr(str)

Over-ride to set the value of the status bar from the widget. If no value is set, it is replaced with a non-blocking space.

Parameter Type Description
str String

The String value to set in the bar.

_StatusBar()
buttonClass()

Class of widget (ex: dijit.form.Button or dijit/form/FilteringSelect) that is added to the toolbar to control this plugin. This is used to instantiate the button, unless button itself is specified directly.

connect(o,f,tf)

Deprecated. Use this.own() with dojo/on or dojo/aspect.instead.

Make a connect.connect() that is automatically disconnected when this plugin is destroyed. Similar to dijit/_Widget.connect().

Parameter Type Description
o undefined
f undefined
tf undefined
destroy()

Over-ride to clean up the breadcrumb toolbar.

get(attr)

Quick and dirty implementation of 'get' pattern

Parameter Type Description
attr undefined

The attribute to get.

Returns:undefined | null
getLabel(key)

Returns the label to use for the button

Parameter Type Description
key String
Returns:undefined
own()
Defined by dijit/Destroyable

Track specified handles and remove/destroy them when this instance is destroyed, unless they were already removed/destroyed manually.

Returns:any | undefined

The array of specified handles, so you can do for example:

var handle = this.own(on(...))[0];
set(attr,val)

Quick and dirty implementation of 'set' pattern

Parameter Type Description
attr undefined

The attribute to set.

val undefined

The value to set it to.

setEditor(editor)

Over-ride for the setting of the editor.

Parameter Type Description
editor Object

The editor to configure for this plugin to use.

setToolbar(toolbar)

Tell the plugin to add it's controller widget (often a button) to the toolbar. Does nothing if there is no controller widget.

Parameter Type Description
toolbar dijit/Toolbar
updateState()

Change state of the plugin to respond to events in the editor.

This is called on meaningful events in the editor, such as change of selection or caret position (but not simple typing of alphanumeric keys). It gives the plugin a chance to update the CSS of its button.

For example, the "bold" plugin will highlight/unhighlight the bold button depending on whether the characters next to the caret are bold or not.

Only makes sense when useDefaultCommand is true, as it calls Editor.queryCommandEnabled(command).

Error in the documentation? Can’t find what you are looking for? Let us know!