projects
/
roojs1
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fe65472
)
Roo/HtmlEditorCore.js
author
Alan
<alan@roojs.com>
Thu, 19 Jan 2023 08:00:43 +0000
(16:00 +0800)
committer
Alan
<alan@roojs.com>
Thu, 19 Jan 2023 08:00:43 +0000
(16:00 +0800)
Roo/HtmlEditorCore.js
patch
|
blob
|
history
diff --git
a/Roo/HtmlEditorCore.js
b/Roo/HtmlEditorCore.js
index
e459943
..
e3466d6
100644
(file)
--- 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('<img src="' + url + '">');
+ var d = (new DOMParser().parseFromString('<img src="' + url + '">', '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 ) {