if (this.enableBlocks) {
Array.from(bd.getElementsByTagName('img')).forEach(function(img) {
- if (img.closest('figure')) { // assume!! that it's aready
- return;
+ var fig = img.closest('figure');
+ if (fig) {
+ var bf = new Roo.htmleditor.BlockFigure({
+ node : fig
+ });
+ bf.updateElement();
}
- var fig = new Roo.htmleditor.BlockFigure({
- image_src : img.src
- });
- fig.updateElement(img); // replace it..
});
new Roo.htmleditor.FilterBlock({ node : div });