From f798b5781e02b560d92cb6dfbf7e5e1ae90756e4 Mon Sep 17 00:00:00 2001 From: void Date: Thu, 29 Apr 2021 14:13:31 +0000 Subject: [PATCH] =?UTF-8?q?setear=20style=20en=20los=20divs=20de=20alineac?= =?UTF-8?q?i=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit arregla el estilo en sitios que no tienen css para los [data-align] --- app/javascript/editor/types/parentBlocks.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/javascript/editor/types/parentBlocks.ts b/app/javascript/editor/types/parentBlocks.ts index d77df2bd..ffe40bdf 100644 --- a/app/javascript/editor/types/parentBlocks.ts +++ b/app/javascript/editor/types/parentBlocks.ts @@ -27,16 +27,19 @@ export const parentBlocks: { [propName: string]: EditorNode } = { left: makeParentBlock("div[data-align=left]", () => { const el = document.createElement("div"); el.dataset.align = "left"; + el.style.textAlign = "left"; return el; }), center: makeParentBlock("div[data-align=center]", () => { const el = document.createElement("div"); el.dataset.align = "center"; + el.style.textAlign = "center"; return el; }), right: makeParentBlock("div[data-align=right]", () => { const el = document.createElement("div"); el.dataset.align = "right"; + el.style.textAlign = "right"; return el; }), };