diff options
author | bob <bcz@cs.brown.edu> | 2019-08-30 13:04:40 -0400 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-08-30 13:04:40 -0400 |
commit | 5f39a01998e5ee60eb6b796a5cd6b11fc680ceee (patch) | |
tree | 4b9a0e5e75e8b1ee2dbc9157eb6b2ecd381d4398 /src/client/util/RichTextSchema.tsx | |
parent | 195497328a6113c40993f3a3d525cc6596955d7c (diff) |
cleanup of outline mode text
Diffstat (limited to 'src/client/util/RichTextSchema.tsx')
-rw-r--r-- | src/client/util/RichTextSchema.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/util/RichTextSchema.tsx b/src/client/util/RichTextSchema.tsx index a642ee46c..0994f5f6b 100644 --- a/src/client/util/RichTextSchema.tsx +++ b/src/client/util/RichTextSchema.tsx @@ -176,13 +176,13 @@ export const nodes: { [index: string]: NodeSpec } = { content: 'list_item+', group: 'block', attrs: { - bulletStyle: { default: "" }, + bulletStyle: { default: 0 }, mapStyle: { default: "decimal" } }, toDOM(node: Node<any>) { const bs = node.attrs.bulletStyle; - const decMap = bs === "indent1" ? "decimal" : bs === "indent2" ? "decimal2" : bs === "indent3" ? "decimal3" : bs === "indent4" ? "decimal4" : ""; - const multiMap = bs === "indent1" ? "decimal" : bs === "indent2" ? "upper-alpha" : bs === "indent3" ? "lower-roman" : bs === "indent4" ? "lower-alpha" : ""; + const decMap = bs === 1 ? "decimal" : bs === 2 ? "decimal2" : bs === 3 ? "decimal3" : bs === 4 ? "decimal4" : ""; + const multiMap = bs === 1 ? "decimal" : bs === 2 ? "upper-alpha" : bs === 3 ? "lower-roman" : bs === 4 ? "lower-alpha" : ""; let map = node.attrs.mapStyle === "decimal" ? decMap : multiMap; for (let i = 0; i < node.childCount; i++) node.child(i).attrs.className = map; return ['ol', { class: `${map}-ol`, style: `list-style: none;` }, 0]; |