2017-12-16 10:58:33 +00:00
|
|
|
title: $:/core/macros/copy-to-clipboard
|
2024-10-22 13:15:34 +01:00
|
|
|
tags: $:/tags/Macro
|
2017-12-16 10:58:33 +00:00
|
|
|
|
2022-04-16 12:19:05 -04:00
|
|
|
\whitespace trim
|
2024-02-14 19:36:32 +01:00
|
|
|
|
2025-01-28 00:45:26 +08:00
|
|
|
\procedure copy-to-clipboard(src,class:"tc-btn-invisible",style,type:"text/plain",plain)
|
|
|
|
\procedure copy-to-clipboard-actions()
|
|
|
|
<$action-sendmessage $message="tm-copy-to-clipboard" $param=<<src>> type=<<type>> plainText=<<plain>>/>
|
|
|
|
\end copy-to-clipboard-actions
|
|
|
|
<$button actions=<<copy-to-clipboard-actions>>
|
2024-02-14 19:36:32 +01:00
|
|
|
class=<<class>>
|
|
|
|
style=<<style>>
|
|
|
|
tooltip={{$:/language/Buttons/CopyToClipboard/Hint}}
|
|
|
|
>
|
|
|
|
{{$:/core/images/copy-clipboard}}
|
|
|
|
<span class="tc-tiny-gap-left">
|
|
|
|
<$text text={{$:/language/Buttons/CopyToClipboard/Caption}}/>
|
|
|
|
</span>
|
2017-12-16 10:58:33 +00:00
|
|
|
</$button>
|
2025-01-28 00:45:26 +08:00
|
|
|
\end copy-to-clipboard
|
2017-12-16 10:58:33 +00:00
|
|
|
|
2025-01-28 00:45:26 +08:00
|
|
|
\procedure copy-to-clipboard-above-right(src,class:"tc-btn-invisible",style,type:"text/plain")
|
|
|
|
<div style.position="relative">
|
|
|
|
<div style.position="absolute" style.bottom="0" style.right="0">
|
|
|
|
<$transclude $variable="copy-to-clipboard" src=<<src>> class=<<class>> style=<<style>> type=<<type>> plain=<<plain>>/>
|
2024-02-14 19:36:32 +01:00
|
|
|
</div>
|
2017-12-16 10:58:33 +00:00
|
|
|
</div>
|
|
|
|
\end
|