From: Alan Date: Thu, 19 Jan 2023 08:00:43 +0000 (+0800) Subject: Roo/HtmlEditorCore.js X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=8c31bb99560fb5a7320eb7509f3de1d5134ed954 Roo/HtmlEditorCore.js --- 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 ) {