diff options
| author | Bob Zeleznik <zzzman@gmail.com> | 2020-06-25 11:46:06 -0400 |
|---|---|---|
| committer | Bob Zeleznik <zzzman@gmail.com> | 2020-06-25 11:46:06 -0400 |
| commit | a4d20e9da3078c00147ca16a25b39ce5c81173ff (patch) | |
| tree | ca3d674d1941141a7f8fbb328c8a39935d0f9dd2 /src/client/views/nodes/formattedText/RichTextRules.ts | |
| parent | e10165da06f042bc6ee2318439d8d75103f82647 (diff) | |
| parent | c692276b6c6909d6cf32b620eb69b114057662ca (diff) | |
Merge branch 'master' into ink_menu
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), |
