diff --git a/tagmanager.js b/tagmanager.js
index e280f4b..1e3a61a 100644
--- a/tagmanager.js
+++ b/tagmanager.js
@@ -42,6 +42,7 @@
onlyTagList: false,
tagList: null,
fillInputOnTagRemove: false,
+ readOnly : false,
},
publicMethods = {
@@ -138,8 +139,10 @@
html = '';
html+= '' + escaped + '';
- html+= '';
- html+= opts.tagCloseIcon + ' ';
+ if (!opts.readOnly) {
+ html+= '';
+ html+= opts.tagCloseIcon + ' ';
+ }
$el = $(html);
if (opts.tagsContainer !== null) {
@@ -471,6 +474,10 @@
privateMethods.prefill.call($self,$(opts.output).val().split(opts.baseDelimiter));
}
+ if (opts.readOnly) {
+ $self.hide();
+ }
+
});
return this;