Answers for "summernote mentions ajax"

0

summernote mentions ajax

$(document).ready(function()
{
    $('.editor').summernote({
        height: 300,
        hint: {
            match: /\B@(\w*)$/,
            users: function(keyword, callback) {
                $.ajax({
                    url: '/users/' + keyword,
                    type: 'get',
                    async: true //This works but freezes the UI
                }).done(callback);
            },
            search: function (keyword, callback) {
                this.users(keyword, callback); //callback must be an array
            },
            content: function (item) {
                return '@' + item;
            }
        }
    });
});
Posted by: Guest on October-31-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language