diff options
author | monikahedman <monika_hedman@brown.edu> | 2019-08-26 09:56:12 -0400 |
---|---|---|
committer | monikahedman <monika_hedman@brown.edu> | 2019-08-26 09:56:12 -0400 |
commit | a085e811d0b1332619ae9117a4dbf13316a82730 (patch) | |
tree | 528479d5a9868f50544cc765b2f3acd8187935b5 /src/client/util/RichTextSchema.tsx | |
parent | ee5f4ad5348f10d9e76eaf2962295a6968e7a4d0 (diff) | |
parent | 939074601016a674d6a01922bab1383684fce63f (diff) |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into monika_linking
Diffstat (limited to 'src/client/util/RichTextSchema.tsx')
-rw-r--r-- | src/client/util/RichTextSchema.tsx | 45 |
1 files changed, 43 insertions, 2 deletions
diff --git a/src/client/util/RichTextSchema.tsx b/src/client/util/RichTextSchema.tsx index 9fdda4845..a8ce4731c 100644 --- a/src/client/util/RichTextSchema.tsx +++ b/src/client/util/RichTextSchema.tsx @@ -173,7 +173,46 @@ export const nodes: { [index: string]: NodeSpec } = { ordered_list: { ...orderedList, content: 'list_item+', - group: 'block' + group: 'block', + attrs: { + bulletStyle: { default: "decimal" }, + }, + toDOM(node: Node<any>) { + return ['ol', { style: `list-style: ${node.attrs.bulletStyle}` }, 0] + } + }, + alphabet_list: { + ...orderedList, + content: 'list_item+', + group: 'block', + attrs: { + bulletStyle: { default: "lower-alpha" }, + }, + toDOM(node: Node<any>) { + return ['ol', { style: `list-style: ${node.attrs.bulletStyle}` }, 0] + } + }, + cap_alphabet_list: { + ...orderedList, + content: 'list_item+', + group: 'block', + attrs: { + bulletStyle: { default: "upper-alpha" }, + }, + toDOM(node: Node<any>) { + return ['ol', { style: `list-style: ${node.attrs.bulletStyle}` }, 0] + } + }, + roman_list: { + ...orderedList, + content: 'list_item+', + group: 'block', + attrs: { + bulletStyle: { default: "lower-roman" }, + }, + toDOM(node: Node<any>) { + return ['ol', { style: `list-style: ${node.attrs.bulletStyle}` }, 0] + } }, //this doesn't currently work for some reason bullet_list: { @@ -181,7 +220,9 @@ export const nodes: { [index: string]: NodeSpec } = { content: 'list_item+', group: 'block', // parseDOM: [{ tag: "ul" }, { style: 'list-style-type=disc' }], - // toDOM() { return ulDOM } + // toDOM() { return ['ol', { + // style: 'list-type: hebrew' + // }] } }, //bullet_list: { |