From 79197956f2159c541b82931a2b5c564e0444883b Mon Sep 17 00:00:00 2001 From: void Date: Fri, 26 Feb 2021 17:54:12 +0000 Subject: [PATCH] =?UTF-8?q?fix(editor):=20arreglar=20problema=20con=20el?= =?UTF-8?q?=20coso=20de=20im=C3=A1genes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/javascript/editor/editor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/editor/editor.ts b/app/javascript/editor/editor.ts index a3919c8..b9e1e9f 100644 --- a/app/javascript/editor/editor.ts +++ b/app/javascript/editor/editor.ts @@ -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 }