avatarTag: string;
username: string;
userID: number;
- // type: "group" | "user";
+ type: "user";
};
type ResultGetSearchResultList = SearchResultItem[];
id: `@${item.username}`,
text: item.username,
icon: item.avatarTag,
+ objectId: item.userID,
+ type: item.type,
};
});
}
return getPossibleMentions(query) as any;
},
itemRenderer: (item: Awaited<ReturnType<typeof getPossibleMentions>>[0]) => {
- // TODO: This is ugly.
return createFragmentFromHtml(`
<span class="ckeditor5__mention">${item.icon} ${item.text}</span>
`).firstElementChild as HTMLElement;
id: `@${item.username}`,
text: item.username,
icon: item.avatarTag,
+ objectId: item.userID,
+ type: item.type,
};
});
}
return getPossibleMentions(query);
},
itemRenderer: (item) => {
- // TODO: This is ugly.
return (0, Util_1.createFragmentFromHtml)(`
<span class="ckeditor5__mention">${item.icon} ${item.text}</span>
`).firstElementChild;
'avatarTag' => $userProfile->getAvatar()->getImageTag(16),
'username' => $userProfile->getUsername(),
'userID' => $userProfile->getObjectID(),
+ 'type' => 'user',
],
$users
),
+.ck.ck-content .mention,
.userMention {
background-color: var(--wcfSidebarBackground);
border-radius: 2px;
}
}
}
+ .ck.ck-content .mention,
.userMention {
color: var(--wcfSidebarLink);