added clipboardTextinput

This commit is contained in:
Saifeddine ALOUI 2023-07-23 15:09:19 +02:00
parent de938d64f5
commit 3ca79f9909

View File

@ -0,0 +1,32 @@
<template>
<div>
<input v-model="inputValue" :placeholder="placeholderText" />
<button @click="pasteFromClipboard"><i data-feather="clipboard"></i></button>
</div>
</template>
<script>
import feather from 'feather-icons'
export default {
data() {
return {
inputValue: "",
placeholderText: "Enter text here",
};
},
mounted() {
console.log('mnted all chat', this.allDiscussionPersonalities)
nextTick(() => {
feather.replace()
})
},
methods: {
pasteFromClipboard() {
navigator.clipboard.readText().then((text) => {
this.inputValue = text;
});
},
},
};
</script>