From ada900de6590a8269c2b55d07dde20bd1096525d Mon Sep 17 00:00:00 2001
From: Anwar khanfir <93767376+akhanfir@users.noreply.github.com>
Date: Tue, 28 Jan 2025 09:37:27 +0100
Subject: [PATCH] fix: request never created if image is pasted on content -
EXO-76645. (#420)
Before this change, when click on process to open request drawer and on request content paste an image, error message displayed and submit button load infinitely. To resolve this problem, add an event handler to detect paste actions and perform media cleanup in the pasted content before displaying it in the editor. After this change, no media content is possible to be pasted on request content.
(cherry picked from commit 785b49fd265a8150006feec8cc1738029d0bf168)
---
.../webapp/vue-app/processes/components/RequestEditor.vue | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/processes-webapp/src/main/webapp/vue-app/processes/components/RequestEditor.vue b/processes-webapp/src/main/webapp/vue-app/processes/components/RequestEditor.vue
index 2aa5d557d..9c4bf8692 100644
--- a/processes-webapp/src/main/webapp/vue-app/processes/components/RequestEditor.vue
+++ b/processes-webapp/src/main/webapp/vue-app/processes/components/RequestEditor.vue
@@ -138,6 +138,12 @@ export default {
blur: function (event) {
self.$emit('blur', event);
},
+ paste: function (event) {
+ const pastedData = (event.data && event.data.dataValue) || '';
+ const cleanedData = pastedData.replace(/]*>|