Type: Object

Operations are the building blocks for all interaction with the application state of Fonto and the XML Fonto has loaded. Operations range from inserting text to opening sidebars or saving the document.

More information can be found in our Operations concept page. Also refer to our guide on creating operations.



Type: Array<String>

If set to a list of operation names, this operation will adopt the behavior of the first of these operations which is enabled. If alternatives is set, steps can not be used. Make sure to use either one.


Type: String

The description is used as tooltip text by UI elements using the operation.


Type: Boolean

Determines whether failure of the operation should redirect to the error route. If false (the default value), a modal will be shown if the operation fails.


For operations with side-effects, it may be necessary to provide separate steps used to compute the state of the operation. Defaults to the steps of the operation, but using the getState callbacks for transforms and actions as appropriate.


Type: String

The icon displayed by UI elements using the operation. This should be one of the FontAwesome icons. Do not include the fa- prefix, just use the icon names as-is from the documentation.


Type: StepData

The data with which to start the steps and getStateSteps pipelines. This data is extended during the run of this operation.


Sets a keyboard listener that executes this operation when a particular combination is pressed. While it is possible to use a ctrl+b/cmd+b keybinding here, it would cause the shortcut win+b on Windows or super+b on Linux to also bind to the operation. Use osxKeyBinding if this should not happen. Please note that browser keybindings and OS keybindings are reserved and will take precedence over any keybinding you will configure for Fonto.


Type: Boolean

Prevents Fonto from actually listening for the keyboard combination, causing it to only be shown in the UI.


Type: Boolean

Allows the keyBinding to work in any part of Fonto, except when focusing the editor is not allowed (eg. when a Modal is opened). Normally a keyBinding for an operation only works when the content view is focused. Warning: we only recommend using this for operations that do not modify the document. Changing the document is almost always done contextually to your cursor position or selection. If your operation keyBinding is global, your cursor or selection might not even be visible to the user (because they scrolled their viewport), which might result in a change to the document that the user is unaware of because they (accidentally) triggered a global keyBinding.


Type: String

The label used when the operation is used in a UI element such as a button or menu item. Defaults to the name of the operation (eg. insert-text).


Type: String

Keybindings for Mac OSX keyboards. This can be used to redefine shortcuts using the cmd key instead of the ctrl key.


The steps executed when the operation is invoked. Steps form a pipeline, passing step data from each step to the next. If steps is set, alternatives can not be used. Make sure to use either one.

Static properties


Type: Boolean

Only used for the copy-paste operations since they are required to run synchronously because of Browser security rules.


Type: Boolean

Used for some operations that should kick in when nothing else is focused, but keep normal browser behaviour if there is anything focused.