aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/RichTextSchema.tsx
diff options
context:
space:
mode:
authorkimdahey <claire_kim1@brown.edu>2019-08-26 10:59:12 -0400
committerkimdahey <claire_kim1@brown.edu>2019-08-26 10:59:12 -0400
commit0bc71503ed58bc07a9e96eae31857b612caa2f24 (patch)
tree07f1fdfbb648c6fcdbf7bd7add8854f5c2c1a4d7 /src/client/util/RichTextSchema.tsx
parentad5def13620e361990423253e113d2c3104f5668 (diff)
parent939074601016a674d6a01922bab1383684fce63f (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into doc_deco_claire
Diffstat (limited to 'src/client/util/RichTextSchema.tsx')
-rw-r--r--src/client/util/RichTextSchema.tsx45
1 files changed, 43 insertions, 2 deletions
diff --git a/src/client/util/RichTextSchema.tsx b/src/client/util/RichTextSchema.tsx
index 92dc50b56..d9e1d6ae1 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: {