aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/formattedText/RichTextRules.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-09-18 23:51:55 -0400
committerbobzel <zzzman@gmail.com>2024-09-18 23:51:55 -0400
commit7b51ab828d127c157bf1560c5ea1bdccf8353e06 (patch)
tree003894a171780a43765b4d69a221e77675c3c1f0 /src/client/views/nodes/formattedText/RichTextRules.ts
parentcc09a9e9015bbcbeec68ccdc574b5250d35a4e8f (diff)
switched icontags to use regular tags list instead of metadata fields. changed tagsView to show # for tags, @ for metadata, and no prefix for icons
Diffstat (limited to 'src/client/views/nodes/formattedText/RichTextRules.ts')
-rw-r--r--src/client/views/nodes/formattedText/RichTextRules.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/nodes/formattedText/RichTextRules.ts b/src/client/views/nodes/formattedText/RichTextRules.ts
index 0ef67b4be..f58434906 100644
--- a/src/client/views/nodes/formattedText/RichTextRules.ts
+++ b/src/client/views/nodes/formattedText/RichTextRules.ts
@@ -406,7 +406,7 @@ export class RichTextRules {
this.Document[DocData].tags = new List<string>(tags);
this.Document._layout_showTags = true;
}
- const fieldView = state.schema.nodes.dashField.create({ fieldKey: '#' + tag });
+ const fieldView = state.schema.nodes.dashField.create({ fieldKey: tag.startsWith('@') ? tag.replace(/^@/, '') : '#' + tag });
return state.tr
.setSelection(new TextSelection(state.doc.resolve(start), state.doc.resolve(end)))
.replaceSelectionWith(fieldView, true)