@ -25,19 +25,19 @@ The Launch specification. This relates to what the button that launches this for
| ---- | ------- |
| `launch` | This is the specification for the launching button that can appear in a ContextToolbar only. It will be either type: `contextformbutton` or `contextformtogglebutton`, and will be identical to those definitions below except it will **not** have an `onAction`. |
#### Launching ContextForms from a ContextToolbar
#### Launching ContextForms from a ContextToolbar
If a registered ContextForm has a `launch` setting, then it can be launched from a ContextToolbar. The name of item will be `form:${name}` (e.g. 'form:link'). When the user presses this button, the toolbar will change into the specified ContextForm. If you the user presses Esc in a ContextForm that was launched through a ContextToolbar, they will be returned to the original ContextToolbar.
#### Launching a ContextForm programmatically
#### Launching a ContextForm programmatically
There is an `editor` event called `contexttoolbar-show` that can be fired to show a ContextForm at the current selection. The event takes a parameter `toolbarKey` which specifies the name of the registered ContextForm or ContextToolbar to show.
### ContextForm Priority
### ContextForm Priority
{% include context/priority.md %}
### Positioning ContextForms
### Positioning ContextForms
There are two options for positioning: `selection` or `line`.
@ -65,7 +65,7 @@ The Form specification: This relates to the form itself.
Unlike normal context toolbar buttons, Context form buttons are not registered beforehand. Instead, you need to define each button completely in the `commands` section.
#### ContextFormButton
#### ContextFormButton
The definition of a ContextFormButton is very similar to the definition of a normal ToolbarButton. The main difference is that the action is slightly different (as it will relate to the form), and the type is `contextformbutton` instead of `button`. In full, the options are:
@ -19,7 +19,7 @@ A ContextToolbar is registered by calling the `addContextToolbar` API in the reg
| `scope` | This controls whether the predicate is a `node`-based predicate, or an `editor`-based predicate. See Context Toolbar Proirity below, for more details. |
| `items` | A list of strings which represent either a registered toolbar button, or a registered context form launcher. |
### Launching a ContextToolbar Programmatically
### Launching a ContextToolbar Programmatically
There is an `editor` event called `contexttoolbar-show` that can be fired to show a ContextToolbar at the current selection. The event takes a parameter `toolbarKey` which specifies the name of the registered ContextForm or ContextToolbar to show.
@ -27,7 +27,7 @@ There is an `editor` event called `contexttoolbar-show` that can be fired to sho
{% include context/priority.md %}
### Positioning ContextToolbars
### Positioning ContextToolbars
There are three options for positioning are: `selection`, `line`, or `node`.