paste raw text
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
style="min-width: 2px"
|
||||
:class="iconInline ? 'inline' : 'block'"
|
||||
class="peer outline-none focus:block"
|
||||
@paste.prevent="onPaste"
|
||||
@keydown.enter.prevent="blurContenteditable"
|
||||
@focus="$emit('focus', $event)"
|
||||
@blur="onBlur"
|
||||
@@ -97,6 +98,9 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onPaste (e) {
|
||||
e.target.innerText = (e.clipboardData || window.clipboardData).getData('text/plain')
|
||||
},
|
||||
selectContent () {
|
||||
const el = this.$refs.contenteditable
|
||||
|
||||
|
||||
Reference in New Issue
Block a user