diff options
author | Bob Zeleznik <zzzman@gmail.com> | 2019-12-10 18:49:03 -0500 |
---|---|---|
committer | Bob Zeleznik <zzzman@gmail.com> | 2019-12-10 18:49:03 -0500 |
commit | 1dbb45826d4414ed7a1acb5daff730b6e79e97c2 (patch) | |
tree | 9258a346834abccc9ce4881664ccb956f53ae9f7 /src/client/util/ParagraphNodeSpec.ts | |
parent | 4ab742c54d600fb62b02268f48e711258558924b (diff) | |
parent | 68ccde3251622fdb51ef3d21282fddd8207da3c1 (diff) |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web
Diffstat (limited to 'src/client/util/ParagraphNodeSpec.ts')
-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; |