mirror of https://github.com/docker/docs.git
fix: copy codeblock
JavaScript methods were lowercased in a bad rebase Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
parent
577c936ed5
commit
f2b49281d9
|
@ -4,7 +4,7 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div class="group relative">
|
<div class="group relative">
|
||||||
<button x-data="{ code: '{{encoding.Base64Encode .Inner}}', copying: false }"
|
<button x-data="{ code: '{{encoding.Base64Encode .Inner}}', copying: false }"
|
||||||
class="absolute right-3 top-3 z-20 text-gray-light-300 dark:text-gray-dark-600" title="copy" @click="window.navigator.clipboard.writetext(atob(code).replaceall(/^[\$>]\s+/gm, ''));
|
class="absolute right-3 top-3 z-20 text-gray-light-300 dark:text-gray-dark-600" title="copy" @click="window.navigator.clipboard.writeText(atob(code).replaceAll(/^[\$>]\s+/gm, ''));
|
||||||
copying = true;
|
copying = true;
|
||||||
setTimeout(() => copying = false, 2000);">
|
setTimeout(() => copying = false, 2000);">
|
||||||
<span :class="{ 'group-hover:block' : !copying }" class="icon-svg hidden">{{ partialCached "icon" "content_copy" "content_copy" }}</span>
|
<span :class="{ 'group-hover:block' : !copying }" class="icon-svg hidden">{{ partialCached "icon" "content_copy" "content_copy" }}</span>
|
||||||
|
|
Loading…
Reference in New Issue