aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/ParagraphNodeSpec.ts
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-12-10 18:49:03 -0500
committerBob Zeleznik <zzzman@gmail.com>2019-12-10 18:49:03 -0500
commit1dbb45826d4414ed7a1acb5daff730b6e79e97c2 (patch)
tree9258a346834abccc9ce4881664ccb956f53ae9f7 /src/client/util/ParagraphNodeSpec.ts
parent4ab742c54d600fb62b02268f48e711258558924b (diff)
parent68ccde3251622fdb51ef3d21282fddd8207da3c1 (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.ts6
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;