diff options
author | Bob Zeleznik <zzzman@gmail.com> | 2019-08-26 21:36:29 -0400 |
---|---|---|
committer | Bob Zeleznik <zzzman@gmail.com> | 2019-08-26 21:36:29 -0400 |
commit | 32c0388d9334ce1f0be04962e00ba3d389c50303 (patch) | |
tree | 03a86371b305bb8c35ddabb4e10258093295bba7 /src | |
parent | 237b5f67733b25686b825573298818f3ea443876 (diff) |
testing things
Diffstat (limited to 'src')
-rw-r--r-- | src/client/util/RichTextSchema.tsx | 13 | ||||
-rw-r--r-- | src/client/views/nodes/FormattedTextBox.scss | 9 |
2 files changed, 21 insertions, 1 deletions
diff --git a/src/client/util/RichTextSchema.tsx b/src/client/util/RichTextSchema.tsx index 6e3d9ab77..b5d81a359 100644 --- a/src/client/util/RichTextSchema.tsx +++ b/src/client/util/RichTextSchema.tsx @@ -243,7 +243,18 @@ export const nodes: { [index: string]: NodeSpec } = { // }, list_item: { ...listItem, - content: 'paragraph block*' + content: 'paragraph block*', + toDOM(node: any) { + let first = node.firstChild; + while (first) { + if (first.marks.find((m: any) => m.type === schema.marks.mbulletType)) { + let x = first.marks.find((m: any) => m.type === schema.marks.mbulletType); + return ["li", { class: "XXX" }, 0]; + } + first = first.firstChild; + } + return ["li", 0]; + } }, }; diff --git a/src/client/views/nodes/FormattedTextBox.scss b/src/client/views/nodes/FormattedTextBox.scss index 1b537cc52..9d5dc76d3 100644 --- a/src/client/views/nodes/FormattedTextBox.scss +++ b/src/client/views/nodes/FormattedTextBox.scss @@ -65,4 +65,13 @@ .em { font-style: italic; +} + +ol { counter-reset: item } +.XXX:before { + content: counters(item, ".") " "; + counter-increment: item ; +} +p { + display:inline; }
\ No newline at end of file |