From ed55df9f412121bb45ba5b4557af4b7435c21e88 Mon Sep 17 00:00:00 2001 From: Christian Wolf Date: Tue, 12 Jan 2021 08:49:33 +0100 Subject: [PATCH 1/2] Allow pasting of normal content Signed-off-by: Christian Wolf --- src/components/EditInputGroup.vue | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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') From 51eea944570389fa2d9a0f8821be64ef299bce96 Mon Sep 17 00:00:00 2001 From: Christian Wolf Date: Tue, 12 Jan 2021 08:51:29 +0100 Subject: [PATCH 2/2] Add changelog entry Signed-off-by: Christian Wolf --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) 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