refactor(editor): support dynamic text attribute key (#12947)
#### PR Dependency Tree * **PR #12946** * **PR #12947** 👈 * **PR #12948** This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal)
This commit is contained in:
@@ -9,14 +9,16 @@ export const MentionInlineSpecExtension =
|
||||
const std = provider.get(StdIdentifier);
|
||||
return {
|
||||
name: 'mention',
|
||||
schema: z
|
||||
.object({
|
||||
member: z.string(),
|
||||
notification: z.string().optional(),
|
||||
})
|
||||
.optional()
|
||||
.nullable()
|
||||
.catch(undefined),
|
||||
schema: z.object({
|
||||
mention: z
|
||||
.object({
|
||||
member: z.string(),
|
||||
notification: z.string().optional(),
|
||||
})
|
||||
.optional()
|
||||
.nullable()
|
||||
.catch(undefined),
|
||||
}),
|
||||
match: delta => {
|
||||
return !!delta.attributes?.mention?.member;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user