mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2026-01-17 10:21:31 +00:00
Fix missing 'data-mention-id' on 'a' tag in webapp
This commit is contained in:
parent
32758de23a
commit
e465e59afe
@ -240,8 +240,10 @@ export default {
|
||||
selectItem(item) {
|
||||
const typeAttrs = {
|
||||
mention: {
|
||||
id: item.id,
|
||||
dataMentionId: item.dataMentionId ?? item.id,
|
||||
id: { hrefId: item.id, dataMentionId: item.dataMentionId ?? item.id },
|
||||
// this solution would better, but "dataMentionId" is then undefined in "webapp/components/Editor/nodes/Mention.js" > "toDOM"
|
||||
// id: item.id,
|
||||
// dataMentionId: item.dataMentionId ?? item.id,
|
||||
label: item.slug,
|
||||
},
|
||||
hashtag: {
|
||||
|
||||
@ -13,8 +13,12 @@ export default class Mention extends TipTapMention {
|
||||
'a',
|
||||
{
|
||||
class: this.options.mentionClass,
|
||||
href: `/profile/${node.attrs.id}`,
|
||||
'data-mention-id': node.attrs.dataMentionId,
|
||||
href: `/profile/${node.attrs.id.hrefId}`,
|
||||
'data-mention-id':
|
||||
node.attrs.id.dataMentionId !== undefined ? node.attrs.id.dataMentionId : 'undefined',
|
||||
// better solution that doesn't work, see "webapp/components/Editor/Editor.vue" > "selectItem"
|
||||
// href: `/profile/${node.attrs.id}`,
|
||||
// 'data-mention-id': node.attrs.dataMentionId, // "dataMentionId" is undefined
|
||||
target: '_blank',
|
||||
},
|
||||
`${this.options.matcher.char}${node.attrs.label} `,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user