I have to create plugin that creates dynamic contextmenu.
I've done already menuItems, but i can't do Listeners.
Something like that piece of code should work, i guess. But it doesn't.
menuItems are correct, because after calling them with their names, contextMenu expands. There's no way that i'm going to consider evry option, I have do i dynamicly.
editor.contextMenu.addListener(function(element, selection) {
for(var i in menuItems) {
item = menuItems[i];
return { item : CKEDITOR.TRISTATE_ON };
}
});
Thanks in advance.
I've done already menuItems, but i can't do Listeners.
Something like that piece of code should work, i guess. But it doesn't.
menuItems are correct, because after calling them with their names, contextMenu expands. There's no way that i'm going to consider evry option, I have do i dynamicly.
editor.contextMenu.addListener(function(element, selection) {
for(var i in menuItems) {
item = menuItems[i];
return { item : CKEDITOR.TRISTATE_ON };
}
});
Thanks in advance.