Add suggest menu for user mentions in text editor

This commit is contained in:
Frederic Guillot
2016-11-27 15:44:45 -05:00
parent 04ff67e26b
commit d8b0423d15
21 changed files with 454 additions and 30 deletions

View File

@@ -61,7 +61,13 @@ KB.render = function () {
for (var i = 0; i < elementList.length; i++) {
if (this.components.hasOwnProperty(name)) {
var component = KB.getComponent(name, elementList[i], JSON.parse(elementList[i].dataset.params));
var options;
if (elementList[i].dataset.params) {
options = JSON.parse(elementList[i].dataset.params);
}
var component = KB.getComponent(name, elementList[i], options);
component.render();
elementList[i].className = elementList[i].className + '-rendered';
}