title: $:/core/macros/copy-to-clipboard
tags: $:/tags/Macro

\whitespace trim

\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>>
	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>
</$button>
\end copy-to-clipboard

\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>>/>
	</div>
</div>
\end
