From c64761a9e5f2c9cb7c90668abcdb8856c46547f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Mon, 14 Jun 2021 16:22:09 +0200 Subject: [PATCH] BREAKING CHANGE: data-mention is not used to parse a mention id or label anymore --- docs/src/demos/Examples/Community/React/index.jsx | 2 +- docs/src/demos/Examples/Community/Vue/index.vue | 2 +- docs/src/demos/Nodes/Mention/index.vue | 6 +++--- packages/extension-mention/src/mention.ts | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/src/demos/Examples/Community/React/index.jsx b/docs/src/demos/Examples/Community/React/index.jsx index baab3abf..f6ca7cce 100644 --- a/docs/src/demos/Examples/Community/React/index.jsx +++ b/docs/src/demos/Examples/Community/React/index.jsx @@ -72,7 +72,7 @@ export default () => { ], content: `

- What do you all think about the new movie? + What do you all think about the new movie?

`, }) diff --git a/docs/src/demos/Examples/Community/Vue/index.vue b/docs/src/demos/Examples/Community/Vue/index.vue index 824c4172..5f5d269b 100644 --- a/docs/src/demos/Examples/Community/Vue/index.vue +++ b/docs/src/demos/Examples/Community/Vue/index.vue @@ -123,7 +123,7 @@ export default { ], content: `

- What do you all think about the new movie? + What do you all think about the new movie?

`, }) diff --git a/docs/src/demos/Nodes/Mention/index.vue b/docs/src/demos/Nodes/Mention/index.vue index e5d9a19b..b22530c0 100644 --- a/docs/src/demos/Nodes/Mention/index.vue +++ b/docs/src/demos/Nodes/Mention/index.vue @@ -82,9 +82,9 @@ export default { ], content: `

Hi everyone! Don’t forget the daily stand up at 8 AM.

-

Would you mind to share what you’ve been working on lately? We fear not much happened since Dirty Dancing. -

Let’s go through your most important points quickly.

-

I have a meeting with and don’t want to come late.

+

Would you mind to share what you’ve been working on lately? We fear not much happened since Dirty Dancing. +

Let’s go through your most important points quickly.

+

I have a meeting with and don’t want to come late.

– Thanks, your big boss

`, }) diff --git a/packages/extension-mention/src/mention.ts b/packages/extension-mention/src/mention.ts index 9fea4afa..2dae93c4 100644 --- a/packages/extension-mention/src/mention.ts +++ b/packages/extension-mention/src/mention.ts @@ -49,7 +49,7 @@ export const Mention = Node.create({ default: null, parseHTML: element => { return { - id: element.getAttribute('data-mention'), + id: element.getAttribute('data-id'), } }, renderHTML: attributes => { @@ -58,7 +58,7 @@ export const Mention = Node.create({ } return { - 'data-mention': attributes.id, + 'data-id': attributes.id, } }, },