diff options
| author | Bob Zeleznik <zzzman@gmail.com> | 2020-06-28 17:02:08 -0400 |
|---|---|---|
| committer | Bob Zeleznik <zzzman@gmail.com> | 2020-06-28 17:02:08 -0400 |
| commit | 777030e88d177daa1f61365c22b945b8808ec61a (patch) | |
| tree | 0e03fb85b8df64367b6eae36cacf42430ace408c /src/client/views/nodes/formattedText/RichTextRules.ts | |
| parent | b79b5ebfd4f8ea8b4ae793e59f05b5bfe79b9b8a (diff) | |
| parent | 7a78bc39fa2b005d67499bcd6baf19b9dce0eb18 (diff) | |
Merge branch 'master' into 3D_carousel
Diffstat (limited to 'src/client/views/nodes/formattedText/RichTextRules.ts')
| -rw-r--r-- | src/client/views/nodes/formattedText/RichTextRules.ts | 11 |
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 91187edf9..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.bullet_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), |
