tm-edit-text-operation invokes one of the available operations on a surrounding text editor. Therefore the message has to be dispatched within the editor in order for it to catch it. The following properties on the
event object are required:
|param||Name of the operation to be executed, see below for a list of possible operations|
|paramObject||Hashmap of additional parameters required by the operation top be executed|
At this point the following text operations have been implemented:
Excises the currently selected text into a new tiddler and replaces it with a link, a macro or a transclude of the new tiddler. Parameters include:
Replaces all contents of the editor with the provided text.
Replaces the current selection with the provided text.
Prefixes the currently selected line(s) with the provided character. If a line is already prefixed by the provided prefix, the prefix is removed instead.
Example Setting character="
Surrounds the selected lines with the provided
Surrounds the current selection with the provided
Saves the text of the current selection into the provided
An example can be seen in $:/core/ui/EditorToolbar/bold:
<$action-sendmessage $message="tm-edit-text-operation" $param="wrap-selection" prefix="''" suffix="''" />