Hi, I've been using a standard plugin to add a richCombo drop down menu but have run into problems with the editor.skinPath property being undefined (browser error shows this, as does an alert(editor.skinPath) test).
I've seen the plugin code (below) in a number of places and noone else seems to complain of this issue. The undefined error prevents the dropdown box from being styled correctly. I've got around this error by hardcoding the path to my editor.css file, but would really like to know what is wrong with my setup so that editor properties are not accessible. The plugin code is as follows:
editor.ui.addRichCombo('MyPlugin', { label: "Insert", className: 'myClassname', showAll: function () { buildList(this, config.MyPlugin); }, panel: { css: [config.contentsCss, CKEDITOR.getUrl(editor.skinPath + 'editor.css')], multiSelect: false, voiceLabel: lang.panelVoiceLabel }, init: function () { var rebuildList = CKEDITOR.tools.bind(buildList, this); rebuildList(); // Initial call // I bind buildList function so that that function has access to "this" later $(editor).bind('rebuildList', rebuildList); }, onClick: function (id) { openIFrame(id, this); } }); var buildList = function () { for (var i in myItems) { var item =myItems[i]; var html = "<img src='" + item.iconSrc + "' class='' style='border: 0 none; margin-right: 4px;vertical-align:middle;' />" + item.text; this.add(item.id, html, item.text); } }; var triggerBuildList = new function(editor){ $(editor).trigger('rebuildList'); };
Thanks in advance for any advice.
Hi, hopefully this isn't too
Hi, hopefully this isn't too late:
See: https://github.com/sstur/ckeditor-ui/blob/master/API-CHANGES.md
You would want to change it to: