Statement | Return value |
tagsinput.getModel()
|
|
Code used to create the input:
var tagsinput = new plana.ui.tags.TagsInput(new goog.Uri('fake'));
tagsinput.setModel([{tagClass: 'label-warning', id:1, caption: 'Hello'}, 'World']);
var loadingImg = goog.dom.createDom('img', { 'src': 'images/ajax-loader.gif' });
tagsinput.getAutoComplete().setLoadingContent(loadingImg);
var container = document.getElementById('tagsdiv');
tagsinput.render(container);
Options:
The table below contains static properties of the tagsinput component. More settings can be configured via the constructor and setter methods. Please see the jsdoc for details.
Option | Description | Default |
plana.ui.tags.TagsInput.DEFAULT_TAG_CSS
|
The default css class to use for rendering tags |
'label-info'
|
plana.ui.tags.TagsInput.MSG_ADD_TAG_PLACEHOLDER
|
The placeholder message to display in the input. Set to an empty string to disable placeholder text |
'Add tag'
|
plana.ui.tags.TagsInput.FADE_SPEED
|
The default speed to use for the fade-in/out animations if a users is trying to add a tag that already exists |
100
|
Notes:
This examples contains two existing tag objects with a 'caption' property:
{id: 1, caption: 'hello'}, {id: 2, caption: 'world'}
and the following string array:
['coding', 'on', 'keep', 'calm', 'and', 'carry']
that can be searched.
We simulate a request taking 200ms to complete.