Skip to content
This repository has been archived by the owner on May 9, 2022. It is now read-only.
Robert Rees edited this page Mar 13, 2015 · 1 revision

A toolbar plugin for Scribe

HTML and CSS

The plugin expects to be passed a DOM element. It will look through this for elements with the data-command-name attribute, generally these will be button elements but they do not have to be. Tool buttons may optionally also supply a data-command-value for the command, these can be used to supply font values for example.

The plugin will add the CSS class active to the relevant element while the command is active and remove it afterwards.

The plugin also toggles the disabled attribute if the underlying command is not executable in the current context (as determined by command.queryEnabled).

Clone this wiki locally