Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(NcRichContentEditable): require leading space to open tributes #5378

Merged
merged 1 commit into from
Mar 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,7 @@ export default {
fillAttr: 'id',
// Search against id and label (display name) (fallback to title for v8.0.0..8.6.1 compatibility)
lookup: result => `${result.id} ${result.label ?? result.title}`,
requireLeadingSpace: true,
// Popup mention autocompletion templates
menuItemTemplate: item => renderMenuItem(this.renderComponentHtml(item.original, NcAutoCompleteResult)),
// Hide if no results
Expand All @@ -582,6 +583,7 @@ export default {
// Don't use the tribute search function at all
// We pass search results as values (see below)
lookup: (result, query) => query,
requireLeadingSpace: true,
// Popup mention autocompletion templates
menuItemTemplate: item => {
if (textSmiles.includes(item.original)) {
Expand Down Expand Up @@ -630,6 +632,7 @@ export default {
// Don't use the tribute search function at all
// We pass search results as values (see below)
lookup: (result, query) => query,
requireLeadingSpace: true,
// Popup mention autocompletion templates
menuItemTemplate: item => renderMenuItem(`<img class="${this.$style['tribute-item__icon']}" src="${item.original.icon_url}"> <span class="${this.$style['tribute-item__title']}">${item.original.title}</span>`),
// Hide if no results
Expand Down
Loading