We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1bcb9f1 + 4b905b3 commit a221ac6Copy full SHA for a221ac6
src/lib/Room/Room.vue
@@ -250,6 +250,7 @@
250
@input="onChangeInput"
251
@keydown.esc="escapeTextarea"
252
@keydown.enter.exact.prevent=""
253
+ @paste="onPasteImage"
254
/>
255
256
<div class="vac-icon-textarea">
@@ -943,6 +944,18 @@ export default {
943
944
this.$refs.file.value = ''
945
this.$refs.file.click()
946
},
947
+ onPasteImage(pasteEvent) {
948
+ const items = pasteEvent.clipboardData?.items
949
+
950
+ if (items) {
951
+ items.forEach(item => {
952
+ if (item.type.indexOf('image') !== -1) {
953
+ const blob = item.getAsFile()
954
+ this.onFileChange([blob])
955
+ }
956
+ })
957
958
+ },
959
async onFileChange(files) {
960
this.fileDialog = true
961
this.resetMediaFile()
0 commit comments