From 8c31bb99560fb5a7320eb7509f3de1d5134ed954 Mon Sep 17 00:00:00 2001 From: Alan Date: Thu, 19 Jan 2023 16:00:43 +0800 Subject: [PATCH] Roo/HtmlEditorCore.js --- Roo/HtmlEditorCore.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Roo/HtmlEditorCore.js b/Roo/HtmlEditorCore.js index e459943ade..e3466d619d 100644 --- a/Roo/HtmlEditorCore.js +++ b/Roo/HtmlEditorCore.js @@ -609,6 +609,7 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component, { var url = urlAPI.createObjectURL( cd.files[0]); this.insertAtCursor(''); + var d = (new DOMParser().parseFromString('', 'text/html')).body; // is insert asycn? if (this.enableBlocks) { @@ -623,7 +624,7 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component, { }); } - + this.insertAtCursor(d.innerHTML.replace(/ /g,' ')); return false; } if (cd.types.indexOf('text/html') < 0 ) { -- 2.39.2