paste raw text

pull/349/head
Pete Matsyburka 1 year ago
parent 3b717ae3de
commit 35f159266a

@ -65,6 +65,7 @@
dir="auto"
class="pr-1 cursor-text outline-none block"
style="min-width: 2px"
@paste.prevent="onPaste"
@keydown.enter.prevent="onNameEnter"
@focus="onNameFocus"
@blur="onNameBlur"
@ -191,6 +192,7 @@
:class="{ 'cursor-text': isContenteditable }"
:placeholder="t('type_value')"
@blur="onDefaultValueBlur"
@paste.prevent="onPaste"
@keydown.enter.prevent="onDefaultValueEnter"
>{{ field.default_value }}</span>
</div>
@ -510,6 +512,9 @@ export default {
this.save()
},
onPaste (e) {
e.target.innerText = (e.clipboardData || window.clipboardData).getData('text/plain')
},
onResizeCell (e) {
if (e.target.id === 'mask') {
const positionX = e.offsetX / (e.target.clientWidth - 1)

@ -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

Loading…
Cancel
Save