aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/ParagraphNodeSpec.ts
diff options
context:
space:
mode:
authorSam Wilkins <samwilkins333@gmail.com>2019-12-10 20:03:07 -0500
committerSam Wilkins <samwilkins333@gmail.com>2019-12-10 20:03:07 -0500
commitc17b200f6d0cb136851b798f280aba9b3862c337 (patch)
treeff517440354dfafe650a9f6542a32e7e2d161eb3 /src/client/util/ParagraphNodeSpec.ts
parent853fbfb7a76cc81c2b4f47e094be159263c88a7a (diff)
parentca70b29bbb1818764b98196f8c28a1255a17965c (diff)
Merge branches 'master' and '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, 6 insertions, 0 deletions
diff --git a/src/client/util/ParagraphNodeSpec.ts b/src/client/util/ParagraphNodeSpec.ts
index fceb8c00f..0a3b68217 100644
--- a/src/client/util/ParagraphNodeSpec.ts
+++ b/src/client/util/ParagraphNodeSpec.ts
@@ -34,6 +34,7 @@ const ParagraphNodeSpec: NodeSpec = {
color: { default: null },
id: { default: null },
indent: { default: null },
+ inset: { default: null },
lineSpacing: { default: null },
// TODO: Add UI to let user edit / clear padding.
paddingBottom: { default: null },
@@ -76,6 +77,7 @@ function toDOM(node: Node): DOMOutputSpec {
const {
align,
indent,
+ inset,
lineSpacing,
paddingTop,
paddingBottom,
@@ -109,6 +111,10 @@ function toDOM(node: Node): DOMOutputSpec {
style += `text-indent: ${indent}; padding-left: ${indent < 0 ? -indent : undefined};`;
}
+ if (inset) {
+ style += `margin-left: ${inset}; margin-right: ${inset};`;
+ }
+
style && (attrs.style = style);
if (indent) {