diff options
author | Bob Zeleznik <zzzman@gmail.com> | 2020-07-28 01:05:19 -0400 |
---|---|---|
committer | Bob Zeleznik <zzzman@gmail.com> | 2020-07-28 01:05:19 -0400 |
commit | ec3a3adb0f9c6706e963432170d59bf54f95702c (patch) | |
tree | 7c2cd91c51602bb6db1b3ec9f23f280562d49a04 /src/client/views/nodes/formattedText/RichTextRules.ts | |
parent | 622ba99eff99f9af2e03c3a5f8a47e9ce95cdf7e (diff) |
chaned # text syntax to create a field startin with #. chaned pivot views to aggreate #keys as if the value were the key after the #
Diffstat (limited to 'src/client/views/nodes/formattedText/RichTextRules.ts')
-rw-r--r-- | src/client/views/nodes/formattedText/RichTextRules.ts | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/client/views/nodes/formattedText/RichTextRules.ts b/src/client/views/nodes/formattedText/RichTextRules.ts index ef0fead4a..dc1d8a2c8 100644 --- a/src/client/views/nodes/formattedText/RichTextRules.ts +++ b/src/client/views/nodes/formattedText/RichTextRules.ts @@ -317,13 +317,12 @@ export class RichTextRules { // create an inline view of a tag stored under the '#' field new InputRule( - new RegExp(/#([a-zA-Z_\-]+[a-zA-Z_;\-0-9]*)\s$/), + new RegExp(/#([a-zA-Z_\-]+[a-zA-Z_\-0-9]*)\s$/), (state, match, start, end) => { const tag = match[1]; if (!tag) return state.tr; - const multiple = tag.split(";"); - this.Document[DataSym]["#"] = multiple.length > 1 ? new List(multiple) : tag; - const fieldView = state.schema.nodes.dashField.create({ fieldKey: "#" }); + this.Document[DataSym]["#" + tag] = "."; + const fieldView = state.schema.nodes.dashField.create({ fieldKey: "#" + tag }); return state.tr.deleteRange(start, end).insert(start, fieldView); }), |