Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

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;
            }
        }
    });
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: switch new date getday javascript 
Javascript :: javascript add fields dynamically 
Javascript :: Delete - Cloudinary 
Javascript :: slice array of objects javascript 
Javascript :: add to array applescript 
Javascript :: length of array 
Javascript :: Grunt--example gruntfile.js 
Javascript :: JavaScript Checking in switch Statement 
Javascript :: like dislike node js 
Javascript :: what is express static 
Javascript :: get element by id two ids 
Javascript :: angular chartjs align legend left 
Javascript :: how to use react-native-vector-icons 
Javascript :: reverse array in js 
Javascript :: delete request reaxt 
Javascript :: convert json to 2d array 
Javascript :: sequelize db:create test environment 
Javascript :: s3.getobject nodejs example 
Javascript :: AJAX - Server Response 
Javascript :: bootstrap and masonry 
Javascript :: react usestate hook 
Javascript :: react hook form example stack overflow 
Javascript :: jquery is not defined error in wordpress 
Javascript :: promise.all in javascript 
Javascript :: empty object is falsy 
Javascript :: react clone element 
Javascript :: js array map skip element 
Javascript :: check if token is expired 
Javascript :: how ot send user agent in nodejs https header 
Javascript :: create record mongoose model 
ADD CONTENT
Topic
Content
Source link
Name
6+2 =