diff --git a/src/jquery.tagsinput.js b/src/jquery.tagsinput.js index 420e953..8cb84e9 100644 --- a/src/jquery.tagsinput.js +++ b/src/jquery.tagsinput.js @@ -177,6 +177,7 @@ interactive:true, defaultText:'add a tag', minChars:0, + inputMaxLength:null, width:'300px', height:'100px', autocomplete: {selectFirst: false }, @@ -220,7 +221,11 @@ var markup = '
'; if (settings.interactive) { - markup = markup + ''; + var extraAttributes = ''; + if (settings.inputMaxLength !== null) { + extraAttributes += ' maxlength="'+settings.inputMaxLength+'" '; + } + markup = markup + ''; } markup = markup + '
';