diff --git a/CHANGELOG.md b/CHANGELOG.md index ef82bfe96..1be823dcc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ [#501](https://github.com/nextcloud/cookbook/pull/500) @christianlupus - Allow to save recipes with custom image URLs [#505](https://github.com/nextcloud/cookbook/pull/505) @christianlupus +- Allow pasting of instructions without newline again + [#503](https://github.com/nextcloud/cookbook/pull/503) @christianlupus ## 0.7.8 - 2021-01-08 diff --git a/src/components/EditInputGroup.vue b/src/components/EditInputGroup.vue index 770dc9d55..1e889e9ca 100644 --- a/src/components/EditInputGroup.vue +++ b/src/components/EditInputGroup.vue @@ -42,7 +42,8 @@ export default { return { // helper variables buffer: this.value.slice(), - contentPasted: false + contentPasted: false, + singleLinePasted: false } }, watch: { @@ -93,6 +94,11 @@ export default { this.$nextTick(function() { if (this.contentPasted) { this.contentPasted = false + + if(this.singleLinePasted) { + this.$emit('input', this.buffer) + } + return } this.$emit('input', this.buffer) @@ -113,9 +119,14 @@ export default { var pastedData = clipboardData.getData('Text') let input_lines_array = pastedData.split(/\r\n|\r|\n/g) + if ( input_lines_array.length == 1) { + this.singleLinePasted = true return + } else { + this.singleLinePasted = false } + e.preventDefault() let $li = $(e.currentTarget).parents('li')