mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-11 04:19:56 +00:00
22286aa569
* Add image toolbar dropdown to markdown plugin * Escape special characters
25 lines
517 B
Plaintext
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>
|
|
"""/>
|