diff options
-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; |