aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-06-22 17:46:02 -0400
committerBob Zeleznik <zzzman@gmail.com>2020-06-22 17:46:02 -0400
commit6017e76469bd820dabdef4e0cab6fbb6c3a988ad (patch)
treefcba292f09718e689c726611ad91eab9dd750006 /src
parentd5b0995f823f8e125c967edbd474bb2c7f106168 (diff)
fixed text input rule for bullets by typing: "- "
Diffstat (limited to 'src')
-rw-r--r--src/client/views/nodes/formattedText/RichTextRules.ts11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/client/views/nodes/formattedText/RichTextRules.ts b/src/client/views/nodes/formattedText/RichTextRules.ts
index e442149d6..ba3230801 100644
--- a/src/client/views/nodes/formattedText/RichTextRules.ts
+++ b/src/client/views/nodes/formattedText/RichTextRules.ts
@@ -59,7 +59,16 @@ export class RichTextRules {
),
// * + - create bullet list
- wrappingInputRule(/^\s*([-+*])\s$/, schema.nodes.ordered_list),
+ wrappingInputRule(/^\s*([-+*])\s$/, schema.nodes.ordered_list,
+ // match => {
+ () => {
+ return ({ mapStyle: "bullet" });
+ // return ({ order: +match[1] })
+ },
+ (match: any, node: any) => {
+ return node.childCount + node.attrs.order === +match[1];
+ },
+ (type: any) => ({ type: type, attrs: { mapStyle: "bullet" } })),
// ``` create code block
textblockTypeInputRule(/^```$/, schema.nodes.code_block),