From 493528a31d6bf65a8e1ffc503804c83665d511ca Mon Sep 17 00:00:00 2001 From: bob Date: Tue, 10 Dec 2019 11:45:46 -0500 Subject: fixed paragraph node toDom() --- src/client/util/ParagraphNodeSpec.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/client/util/ParagraphNodeSpec.ts') diff --git a/src/client/util/ParagraphNodeSpec.ts b/src/client/util/ParagraphNodeSpec.ts index 593aec498..fceb8c00f 100644 --- a/src/client/util/ParagraphNodeSpec.ts +++ b/src/client/util/ParagraphNodeSpec.ts @@ -105,6 +105,10 @@ function toDOM(node: Node): DOMOutputSpec { style += `padding-bottom: ${paddingBottom};`; } + if (indent) { + style += `text-indent: ${indent}; padding-left: ${indent < 0 ? -indent : undefined};`; + } + style && (attrs.style = style); if (indent) { @@ -115,7 +119,7 @@ function toDOM(node: Node): DOMOutputSpec { attrs.id = id; } - return ['p', { ...attrs, ...{ style: `text-indent: ${indent}; padding-left: ${indent < 0 ? -indent : undefined};` } }, 0]; + return ['p', attrs, 0]; } export const toParagraphDOM = toDOM; -- cgit v1.2.3-70-g09d2