* Fires when on any editor (mouse up/down cursor movement etc.) - used for toolbar hooks.
* @param {Roo.HtmlEditorCore} this
*/
- editorevent: true
+ editorevent: true
+
});
}
if (this.enableBlocks) {
- Array.from(d.getElementByTagType('img')).forEach(function(img) {
+ Array.from(d.getElementsByTagName('img')).forEach(function(img) {
if (img.closest('figure')) { // assume!! that it's aready
return;
}
- var fig = Roo.htmleditor.BlockFigure({
+ var fig = new Roo.htmleditor.BlockFigure({
image_src : img.src
});
fig.updateElement(img); // replace it..
}
- this.insertAtCursor(d.innerHTML);
+ this.insertAtCursor(d.innerHTML.replace(/ /g,' '));
if (this.enableBlocks) {
Roo.htmleditor.Block.initAll(this.doc.body);
}