aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/RichTextRules.ts
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/RichTextRules.ts
parentad5def13620e361990423253e113d2c3104f5668 (diff)
parent939074601016a674d6a01922bab1383684fce63f (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into doc_deco_claire
Diffstat (limited to 'src/client/util/RichTextRules.ts')
-rw-r--r--src/client/util/RichTextRules.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/client/util/RichTextRules.ts b/src/client/util/RichTextRules.ts
index 3b8396510..89933650b 100644
--- a/src/client/util/RichTextRules.ts
+++ b/src/client/util/RichTextRules.ts
@@ -26,6 +26,14 @@ export const inpRules = {
match => ({ order: +match[1] }),
(match, node) => node.childCount + node.attrs.order === +match[1]
),
+ // 1. ordered list
+ wrappingInputRule(
+ /^([a-z]+)\.\s$/,
+ schema.nodes.alphabet_list,
+ match => ({ order: +match[1] }),
+ (match, node) => node.childCount + node.attrs.order === +match[1]
+ ),
+
// * bullet list
wrappingInputRule(/^\s*([-+*])\s$/, schema.nodes.bullet_list),