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.
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.
The description is used as tooltip text by UI elements using the operation.
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.
The icon displayed by UI elements using the operation. This should be one of the FontAwesome (v5 Pro) icon names with an optional style prefix ('far ' is the default prefix). For more info, see the Font Awesome concept page.
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.
Prevents Fonto from actually listening for the keyboard combination, causing it to only be shown in the UI.
Binding Is Global
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 focussed. 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.
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).
Keybindings for Mac OSX keyboards. This can be used to redefine shortcuts using the cmd key instead of the ctrl key.