mirror of
https://github.com/outline/outline.git
synced 2026-11-27 07:58:51 +03:00
fix: Show @ symbol on mentions in email snippets
This commit is contained in:
1 parent
dcb7b86df8
commit
166980d2a1
1 file changed
+7
-5
@@ -32,6 +32,11 @@ export default class Mention extends Node {
|
||||
}
|
||||
|
||||
get schema(): NodeSpec {
|
||||
const toPlainText = (node: ProsemirrorNode) =>
|
||||
node.attrs.type === MentionType.User
|
||||
? `@${node.attrs.label}`
|
||||
: node.attrs.label;
|
||||
|
||||
return {
|
||||
attrs: {
|
||||
type: {
|
||||
@@ -88,12 +93,9 @@ export default class Mention extends Node {
|
||||
"data-actorid": node.attrs.actorId,
|
||||
"data-url": `mention://${node.attrs.id}/${node.attrs.type}/${node.attrs.modelId}`,
|
||||
},
|
||||
String(node.attrs.label),
|
||||
toPlainText(node),
|
||||
],
|
||||
toPlainText: (node) =>
|
||||
node.attrs.type === MentionType.User
|
||||
? `@${node.attrs.label}`
|
||||
: node.attrs.label,
|
||||
toPlainText,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user