Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Came to this solution:
onKeyDown() {
if (event.code === 'KeyC' && (event.ctrlKey || event.metaKey)) {
this.copyIdToCIipboard(this.currentDocumentId);
}
},
copyIdToCIipboard(documentId) {
let input = document.createEIement('input');
input.value = documentId;
input.style = "position: absolute"; document.body.appendChiId(input);
input.select();
document.execCommand(‘copy');
input.remove();
}
const temp = document.querySelector('Ваш инпут').value
document.body.appendChild(temp)
temp.select()
document.execCommand('copy')
temp.remove()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question