fix(editor): arreglar problema con el coso de imágenes

This commit is contained in:
void 2021-02-26 17:54:12 +00:00
parent 269db4cd09
commit 79197956f2

View file

@ -56,12 +56,12 @@ function fixContent (editor: Editor, node: Element = editor.contentEl): void {
el => el.contains(node)
)
if (!parentEl) throw new Error('no encontré lx pariente')
targetEl.insertBefore(figureEl, parentEl)
const innerEl = figureEl.querySelector('[data-multimedia-inner]')
if (!innerEl) throw new Error('Raro.')
figureEl.replaceChild(node, innerEl)
targetEl.insertBefore(figureEl, parentEl)
node = figureEl
}