Use innerHTML instead of innerText in Code Copy strings

so that users willing to use a svg inplace of already existing text can update the i18n strings and get an svg in place
This commit is contained in:
Aditya Telange 2022-05-14 10:55:41 +05:30
parent cf5b2d59b2
commit b7dbb0ea0e
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77

View File

@ -91,12 +91,12 @@
const copybutton = document.createElement('button');
copybutton.classList.add('copy-code');
copybutton.innerText = '{{- i18n "code_copy" | default "copy" }}';
copybutton.innerHTML = '{{- i18n "code_copy" | default "copy" }}';
function copyingDone() {
copybutton.innerText = '{{- i18n "code_copied" | default "copied!" }}';
copybutton.innerHTML = '{{- i18n "code_copied" | default "copied!" }}';
setTimeout(() => {
copybutton.innerText = '{{- i18n "code_copy" | default "copy" }}';
copybutton.innerHTML = '{{- i18n "code_copy" | default "copy" }}';
}, 2000);
}