CKEDITOR.plugins.autocomplete.model.item
An abstract class representing one data item. A item can be understood as one entry in the autocomplete panel.
An item must have a unique id and may have more properties which can then be used, for example, in the CKEDITOR.plugins.autocomplete.view.itemTemplate template or the CKEDITOR.plugins.autocomplete.getHtmlToInsert method.
Example items:
{ id: 345, name: 'CKEditor' }
{ id: 'smile1', alt: 'smile', emojiSrc: 'emojis/smile.png' }
Filtering
Properties
-
The unique ID of the item. The ID should not change with time, so two CKEDITOR.plugins.autocomplete.model.dataCallback calls should always result in the same ID for the same logical item. This can, for example, allow to keep the same item selected when the data changes.
Note: When using a string as an item, make sure that the string does not contain any special characters (above all
"[]
characters). This limitation is due to the simplified way the CKEDITOR.plugins.autocomplete.view stores IDs in the DOM.