alexgorbatchev/jquery-textext — Issue #9: Can't add tags manually, if 'filter' plugin enabled
Author: evereq
Created: 2012-01-15 15:46:24+00:00
State: open

Say you have following setup:
$('#keywords').textext({
plugins: 'prompt focus autocomplete arrow ajax filter tags',
prompt: 'press enter after each tag...',
ajax: {
url: tagsUrl,
dataType: 'json',
cacheResults: false
}
});

Then you try to add some "initial" tags manually like:
var textext = $('#keywords').textext()[0];
textext.tags().addTags(['tag1','tag2']);

And as result you see nothing, i.e. no tags will be added into input box. However user CAN enter on page such tags manually (in case if your AJAX json response contains them... i.e. filter DO work, just you can't add tags from your JS code!)

P.S. things like $('textarea').textext()[0].filter.items = ['tag1','tag2']; also do not help (i.e. attempt to add few items before add tags), same as to disable / enable filter plugin using filter.enabled = false and later, after add tags do filter.enabled = true etc.

Please help :)