Creates a new action.
Applies the action, if possible. The base class reminds developers that the method must be overridden, so subclasses should not invoke the super implementation.
The view that the action was registered with.
Returns whether the action can currently be applied. The base class will always return true.
This method must not modify the contents of the editor document.
The view that the action was registered with.
Returns true if and only if the action can be applied.
Returns a string that describes the action to end users.
A brief, human-friendly description of the action.
This API is still under development and is subject to change. Copyright © Math I Can Do Solutions Incorporated and/or its licensors.
The base class for creating custom editing actions. While built-in commands are applied through an editor, custom actions are activated through a particular view. This allows custom actions to mix low-level commands (through
view.editor.apply
) with higher-level functionality like View.type.An action is typically activated when a view receives an input that maps to the action in one of its InputMaps. For example, the action may be added to a view's gesture map with a keyboard shortcut.
Example: Define an action that makes the current selection transparent
InputMap