5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-23 07:26:22 +00:00

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) el => el.contains(node)
) )
if (!parentEl) throw new Error('no encontré lx pariente') if (!parentEl) throw new Error('no encontré lx pariente')
targetEl.insertBefore(figureEl, parentEl)
const innerEl = figureEl.querySelector('[data-multimedia-inner]') const innerEl = figureEl.querySelector('[data-multimedia-inner]')
if (!innerEl) throw new Error('Raro.') if (!innerEl) throw new Error('Raro.')
figureEl.replaceChild(node, innerEl) figureEl.replaceChild(node, innerEl)
targetEl.insertBefore(figureEl, parentEl)
node = figureEl node = figureEl
} }