diff --git a/plugins/tiddlywiki/markdown/EditorToolbar/picture-dropdown.tid b/plugins/tiddlywiki/markdown/EditorToolbar/picture-dropdown.tid new file mode 100644 index 000000000..966c991fd --- /dev/null +++ b/plugins/tiddlywiki/markdown/EditorToolbar/picture-dropdown.tid @@ -0,0 +1,24 @@ +title: $:/plugins/tiddlywiki/markdown/EditorToolbar/picture-dropdown + +\define replacement-text() +![](<#$(escaped-text)$>) +\end + +\define escapetitle() [()<>\\] + +''{{$:/language/Buttons/Picture/Hint}}'' + +<$macrocall $name="image-picker" actions=""" + +<$let escaped-text={{{ [search-replace:g:regexp,[\$&]] }}}> +<$action-sendmessage + $message="tm-edit-text-operation" + $param="replace-selection" + text=<> +/> + +<$action-deletetiddler + $tiddler=<> +/> + +"""/> diff --git a/plugins/tiddlywiki/markdown/EditorToolbar/picture.tid b/plugins/tiddlywiki/markdown/EditorToolbar/picture.tid new file mode 100644 index 000000000..27e108c81 --- /dev/null +++ b/plugins/tiddlywiki/markdown/EditorToolbar/picture.tid @@ -0,0 +1,10 @@ +title: $:/plugins/tiddlywiki/markdown/EditorToolbar/picture +list-after: $:/core/ui/EditorToolbar/picture +tags: $:/tags/EditorToolbar +icon: $:/core/images/picture +caption: {{$:/language/Buttons/Picture/Caption}} (Markdown) +description: {{$:/language/Buttons/Picture/Hint}} +condition: [type[text/x-markdown]] [type[text/markdown]] +shortcuts: ((picture)) +dropdown: $:/plugins/tiddlywiki/markdown/EditorToolbar/picture-dropdown +