diff options
author | bob <bcz@cs.brown.edu> | 2019-12-10 11:45:46 -0500 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-12-10 11:45:46 -0500 |
commit | 493528a31d6bf65a8e1ffc503804c83665d511ca (patch) | |
tree | 25b436af5c142689ceb174aef41bfa2f46eb05ab | |
parent | 1c7c38868978b0f68dbad8a9e07d3d30967c23e1 (diff) |
fixed paragraph node toDom()
-rw-r--r-- | src/client/util/ParagraphNodeSpec.ts | 6 |
1 files changed, 5 insertions, 1 deletions
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; |