bootstrap tokenfiel delimiter '\n' (new line) copy and paste not working

I wanna copy and paste a list of values separated by: ‘\n’ like this:

123

234

234

in my boostrap tokenfield, but when I set the delimiter to: ‘\n’ it doesn´t work .
this is my jquery configuration:

$('#res_pago').tokenfield({
    autocomplete :{
        source: function(request, response){
            $.ajax({
                  type : "POST",
                  url : "api/getResponsablePago",
                  data : {myData: request.term},
                  success : function(result) {
                      console.log(result);
                      var datas = [];
                      if(result.data != undefined){
                          result.data.forEach(element => datas.push({ value: element.responsableID, label: element.responsableID + " - " + element.responsableDes}));
                      }
                      response(datas);
                  }
            });
            
        },
        delay: 800,
    },
    showAutocompleteOnFocus: true,
    delimiter: [',','\n']
});

any idea?

53 thoughts on “bootstrap tokenfiel delimiter '\n' (new line) copy and paste not working”

  1. 789577 123587Some times its a discomfort within the ass to read what blog owners wrote but this internet website is rattling user friendly ! . 803815

    Reply

Leave a Comment