aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/RichTextSchema.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-08-27 00:38:19 -0400
committerBob Zeleznik <zzzman@gmail.com>2019-08-27 00:38:19 -0400
commit249038c576845027e91fe9e20cc791602c22d25d (patch)
tree794ea31f4ba7e7f143b7bc67eec02511984c830b /src/client/util/RichTextSchema.tsx
parent58300460307b2c944f1dd2d0d3b8e2515f529f72 (diff)
working except for moving multiple nodes at different levels at the same time
Diffstat (limited to 'src/client/util/RichTextSchema.tsx')
-rw-r--r--src/client/util/RichTextSchema.tsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/util/RichTextSchema.tsx b/src/client/util/RichTextSchema.tsx
index 37813958a..26960e889 100644
--- a/src/client/util/RichTextSchema.tsx
+++ b/src/client/util/RichTextSchema.tsx
@@ -178,7 +178,8 @@ export const nodes: { [index: string]: NodeSpec } = {
bulletStyle: { default: "decimal" },
},
toDOM(node: Node<any>) {
- return ['ol', { style: `list-style: ${node.attrs.bulletStyle}` }, 0]
+ let fsize = node.attrs.bulletStyle === "decimal" ? 24 : node.attrs.bulletStyle === "upper-alpha" ? 18 : node.attrs.bulletStyle === "lower-roman" ? 14 : 10;
+ return ['ol', { style: `list-style: ${node.attrs.bulletStyle}; font-size: ${fsize}` }, 0]
}
},
alphabet_list: {
@@ -278,7 +279,7 @@ export const marks: { [index: string]: MarkSpec } = {
// :: MarkSpec An emphasis mark. Rendered as an `<em>` element.
// Has parse rules that also match `<i>` and `font-style: italic`.
em: {
- parseDOM: [{ tag: "i" }, { tag: "em" }, { style: "font-style=italic" }],
+ parseDOM: [{ tag: "i" }, { tag: "em" }, { style: "font-style: italic" }],
toDOM() { return emDOM; }
},