projects
/
roojs1
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4697928
)
Roo/HtmlEditorCore.js
author
leon
<leon@roojs.com>
Wed, 14 Feb 2024 07:29:05 +0000
(15:29 +0800)
committer
leon
<leon@roojs.com>
Wed, 14 Feb 2024 07:29:05 +0000
(15:29 +0800)
Roo/HtmlEditorCore.js
patch
|
blob
|
history
diff --git
a/Roo/HtmlEditorCore.js
b/Roo/HtmlEditorCore.js
index
3eca682
..
313e3b8
100644
(file)
--- a/
Roo/HtmlEditorCore.js
+++ b/
Roo/HtmlEditorCore.js
@@
-376,7
+376,16
@@
Roo.extend(Roo.HtmlEditorCore, Roo.Component, {
if (this.enableBlocks) {
- Roo.htmleditor.Block.initAll(bd);
+ Array.from(bd.getElementsByTagName('img')).forEach(function(img) {
+ if (img.closest('figure')) { // assume!! that it's aready
+ return;
+ }
+ var fig = new Roo.htmleditor.BlockFigure({
+ image_src : img.src
+ });
+ fig.updateElement(img); // replace it..
+
+ });
new Roo.htmleditor.FilterBlock({ node : div });
}