I was reviewing my notes about subj and found out that my draft from this thread Documentation about toolbars is not accurate.
I can have an Edit toolbar (or View toolbar) button like this:
<$button>
<$action-sendmessage $message="tm-modal" $param="SampleModal" />
{{$:/core/images/discord}}
</$button>
Here SampleModal
is a tiddler that has content displayed in the modal window.
If I tag this tiddler $:/tags/EditToolbar
and save, the button starts getting displayed in tiddler edit window.
But it seems that creating a custom button for the Editor toolbar isn’t as simple as changing the $:/tags/EditToolbar
tag to $:/tags/EditorToolbar
. I had to do the following changes (by looking at core buttons code):
- Remove the explicit
<$button>
widget wikitext, leave only action code:
<$action-sendmessage $message="tm-modal" $param="SampleModal" />
-
Remove the transclusion of button icon, add the icon as
icon
field instead -
If I want the button to always show up, have a mandatory
condition
field with non-empty value.
Could anybody please explain the implementation inconsistencies here? What makes the Editor toolbar so different?