GithubHelp home page GithubHelp logo

Comments (2)

rimi-itk avatar rimi-itk commented on July 19, 2024

It seems that we're using the default limit of 10 items (cf. https://github.com/StevenDevooght/tinyMCE-mention?tab=readme-ov-file#items). A higher limit can easily be set by defining limit in

var mentionsConfig = {
delimiter: '@',
delay: 20,
source: function (query, process, delimiter) {
// Do your ajax call
// When using multiple delimiters you can alter the query depending on the delimiter used
if (delimiter === '@') {
jQuery.getJSON(leantime.appUrl + '/api/users?projectUsersAccess=current', function (data) {
//call process to show the result
let users = [];
for (let i = 0; i < data.length; i++) {
users[i] = {
"name": data[i].firstname + " " + data[i].lastname,
"id": data[i].id,
"email": data[i].username
};
}
process(users);
});
}
},
highlighter: function (text) {
//make matched block italic
return text.replace(new RegExp('(' + this.query + ')', 'ig'), function ($1, match) {
return '<strong>' + match + '</strong>';
});
},
insert: function (item) {
return '<a class="userMention" data-tagged-user-id="' + item.id + '" href="javascript:void(0)"><img src="' + leantime.appUrl + '/api/users?profileImage=' + item.id + '" alt="' + item.name + ' Image"/>' + item.name.trim() + '</a>&nbsp;';
}
};
.

However, limiting to 10 items seems reasonable, and the real issue here might be that filtering in the underlying library, https://github.com/StevenDevooght/tinyMCE-mention, is broken and that Leantime therefore cannot (and doesn't) filter the user list based in the input (after @).

The solution seems to be hidden inside the pointers:

I'll investigate further and try to come up with a solution.

from leantime.

marcelfolaron avatar marcelfolaron commented on July 19, 2024

Fixed in 3.1.0-beta

from leantime.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.