mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-02 14:29:55 +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>
|
|
"""/>
|