I would like to create a keyboard shortcut to insert the text (css styling):
@@margin-left:50px;@@
into any current tiddler. I have gotten as far as creating a tiddler titled $:/config/ShortcutInfo/50px-indentor
, with the following description which appears under the control panel keyboard shorcuts tab:
Creates a css styling that indents all text inside the `@@` by 50px.
I also have a tiddler titled $:/config/shortcuts/50px-indentor
with alt-6
in the text field. alt-6
shows up as the key binding for my 50px-indentor keyboard shorcut under the control panel keyboard shortcuts tab. I have also created a tiddler titled 50px-indentor
with the tag $:/tags/KeyboardShortcut
, a key
field of ((50px-indentor))
, and a text field of:
<$keyboard key="((50px-indentor))">
<$action-sendmessage
$message="tm-edit-text-operation"
$param="insert-text"
character="@@margin-left:50px;@@"
count="1"
/>
</$keyboard>
I have been successful with getting the shortcut to work with an alternate action widget, but I have been unsuccessful with this widget. Would someone please show me what I’m missing. The documentation on the action-sendmessage and keyboard widgets has been confusing. Screenshot of the 3 above-mentioned tiddlers below: