From 0c8e334b1a77c13bc97ea9e9775f0fd132cce212 Mon Sep 17 00:00:00 2001 From: advplyr Date: Thu, 29 May 2025 17:27:29 -0500 Subject: [PATCH] Update rich text editor to prevent pasting in images from the browser --- client/components/ui/VueTrix.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/client/components/ui/VueTrix.vue b/client/components/ui/VueTrix.vue index 6a24f1d3..2687d934 100644 --- a/client/components/ui/VueTrix.vue +++ b/client/components/ui/VueTrix.vue @@ -31,7 +31,7 @@ - + @@ -316,6 +316,12 @@ export default { if (this.$refs.trix && this.$refs.trix.blur) { this.$refs.trix.blur() } + }, + handleAttachmentAdd(event) { + // Prevent pasting in images from the browser + if (!event.attachment.file) { + event.attachment.remove() + } } }, mounted() {