From 6db8736aa5b20f2121de3005a6b203039aa59243 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Julius=20H=C3=A4rtl?=
Date: Thu, 7 Mar 2024 16:50:27 +0100
Subject: [PATCH 1/2] fix(NcRichText): Allow to pass interactive widget toggle
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Julius Härtl
---
src/components/NcRichText/NcRichText.vue | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/src/components/NcRichText/NcRichText.vue b/src/components/NcRichText/NcRichText.vue
index 52ed595d6c..2abcbe6083 100644
--- a/src/components/NcRichText/NcRichText.vue
+++ b/src/components/NcRichText/NcRichText.vue
@@ -324,6 +324,10 @@ export default {
type: Number,
default: 0,
},
+ referenceInteractive: {
+ type: Boolean,
+ default: true,
+ },
/** Provide data upfront to avoid extra http request */
references: {
type: Object,
@@ -401,7 +405,13 @@ export default {
h('div', {}, placeholders.flat()),
this.referenceLimit > 0
? h('div', { class: 'rich-text--reference-widget' }, [
- h(NcReferenceList, { props: { text: this.text, referenceData: this.references } }),
+ h(NcReferenceList, {
+ props: {
+ text: this.text,
+ referenceData: this.references,
+ interactive: this.referenceInteractive,
+ },
+ }),
])
: null,
])
@@ -511,7 +521,13 @@ export default {
renderedMarkdown,
this.referenceLimit > 0
? h('div', { class: 'rich-text--reference-widget' }, [
- h(NcReferenceList, { props: { text: this.text, referenceData: this.references } }),
+ h(NcReferenceList, {
+ props: {
+ text: this.text,
+ referenceData: this.references,
+ interactive: this.referenceInteractive,
+ },
+ }),
])
: null,
])
From e79dbd898a4d27afe207998893390347dea14f21 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Julius=20H=C3=A4rtl?=
Date: Fri, 8 Mar 2024 09:45:02 +0100
Subject: [PATCH 2/2] fix: Only show opt in if requested
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Julius Härtl
---
src/components/NcRichText/NcReferenceWidget.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/NcRichText/NcReferenceWidget.vue b/src/components/NcRichText/NcReferenceWidget.vue
index 5bd0beb2cc..753aa7aa05 100644
--- a/src/components/NcRichText/NcReferenceWidget.vue
+++ b/src/components/NcRichText/NcReferenceWidget.vue
@@ -23,7 +23,7 @@
-
+
{{ enableLabel }}