diff options
| author | bobzel <zzzman@gmail.com> | 2024-08-23 11:50:49 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2024-08-23 11:50:49 -0400 |
| commit | dc7bb2ff07139c45efd3bf66ace0042b76c91ccf (patch) | |
| tree | 38304ea860618de3759a40b4e086ea247389c74a /src/client/views/nodes/formattedText/RichTextRules.ts | |
| parent | add4926f62b397fc6c655be31a711dd7b83b469a (diff) | |
modified keywordsBox to use tags instead data_labels. made text #tags trigger keywords box. made keywords box fit contents.
Diffstat (limited to 'src/client/views/nodes/formattedText/RichTextRules.ts')
| -rw-r--r-- | src/client/views/nodes/formattedText/RichTextRules.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/nodes/formattedText/RichTextRules.ts b/src/client/views/nodes/formattedText/RichTextRules.ts index 39f589b1e..79c118490 100644 --- a/src/client/views/nodes/formattedText/RichTextRules.ts +++ b/src/client/views/nodes/formattedText/RichTextRules.ts @@ -396,7 +396,7 @@ export class RichTextRules { }), // create an inline view of a tag stored under the '#' field - new InputRule(/#([a-zA-Z_-]+[a-zA-Z_\-0-9]*)\s$/, (state, match, start, end) => { + new InputRule(/#(@?[a-zA-Z_-]+[a-zA-Z_\-0-9]*)\s$/, (state, match, start, end) => { const tag = match[1]; if (!tag) return state.tr; // this.Document[DocData]['#' + tag] = '#' + tag; @@ -404,6 +404,7 @@ export class RichTextRules { if (!tags.includes(tag)) { tags.push(tag); this.Document[DocData].tags = new List<string>(tags); + this.Document[DocData].showLabels = true; } const fieldView = state.schema.nodes.dashField.create({ fieldKey: '#' + tag }); return state.tr |
