aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/RichTextSchema.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-11-10 19:46:32 -0500
committerBob Zeleznik <zzzman@gmail.com>2019-11-10 19:46:32 -0500
commitf4ca517725714d770096d683478a6f5cc995c0c3 (patch)
tree8a0778f4bb71242a839b56e42b98f81821631be8 /src/client/util/RichTextSchema.tsx
parentb625719e71bcfc09e905b8f164b3ed76994b1d59 (diff)
fixed switching between ordered list and bullets.
Diffstat (limited to 'src/client/util/RichTextSchema.tsx')
-rw-r--r--src/client/util/RichTextSchema.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/util/RichTextSchema.tsx b/src/client/util/RichTextSchema.tsx
index cc3548e1a..a224c57eb 100644
--- a/src/client/util/RichTextSchema.tsx
+++ b/src/client/util/RichTextSchema.tsx
@@ -241,6 +241,7 @@ export const nodes: { [index: string]: NodeSpec } = {
},
toDOM(node: Node<any>) {
const bs = node.attrs.bulletStyle;
+ if (node.attrs.mapStyle === "bullet") return ['ul', 0];
const decMap = bs ? "decimal" + bs : "";
const multiMap = bs === 1 ? "decimal1" : bs === 2 ? "upper-alpha" : bs === 3 ? "lower-roman" : bs === 4 ? "lower-alpha" : "";
let map = node.attrs.mapStyle === "decimal" ? decMap : multiMap;
@@ -273,7 +274,7 @@ export const nodes: { [index: string]: NodeSpec } = {
const bs = node.attrs.bulletStyle;
const decMap = bs ? "decimal" + bs : "";
const multiMap = bs === 1 ? "decimal1" : bs === 2 ? "upper-alpha" : bs === 3 ? "lower-roman" : bs === 4 ? "lower-alpha" : "";
- let map = node.attrs.mapStyle === "decimal" ? decMap : multiMap;
+ let map = node.attrs.mapStyle === "decimal" ? decMap : node.attrs.mapStyle === "multi" ? multiMap : "";
return node.attrs.visibility ? ["li", { class: `${map}` }, 0] : ["li", { class: `${map}` }, "..."];
//return ["li", { class: `${map}` }, 0];
}