1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-02 14:29:55 +00:00
TiddlyWiki5/plugins/tiddlywiki/markdown/EditorToolbar/picture-dropdown.tid
Leilei332 22286aa569
Add image toolbar dropdown to markdown plugin (#8459)
* Add image toolbar dropdown to markdown plugin

* Escape special characters
2024-07-31 13:38:25 +01:00

25 lines
517 B
Plaintext

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={{{ [<imageTitle>search-replace:g:regexp<escapetitle>,[\$&]] }}}>
<$action-sendmessage
$message="tm-edit-text-operation"
$param="replace-selection"
text=<<replacement-text>>
/>
<$action-deletetiddler
$tiddler=<<dropdown-state>>
/>
</$let>
"""/>