I'm modifying a plugin that adds a custom TinyMCE menu in WP. I need to be able to add icons to the dropdown menu items and sub-menu items. I've enabled icons, which added the space for them in the HTML, but can't figure out the JS to put them in.
createControl:function(d,e){if(d=="ss_button"){d=e.createMenuButton("ss_button",{title:"SS Shortcodes",image:"../wp-content/plugins/ss-shorts/js/images/shortcodes.png",icons:true});var a=this;
d.onRenderMenu.add(function(c,b){
b.addSeparator();c=b.addMenu({image:"../wp-content/plugins/ss-shorts/js/images/uparrow.png",title:" Arrows"});
a.addImmediate(c,"Right Arrow","[rightarrow]");
a.addImmediate(c,"Left Arrow","[leftarrow]");
a.addImmediate(c,"Up Arrow","[uparrow]");
a.addImmediate(c,"Down Arrow","[downarrow]");
b.addSeparator();
Adding image: before or after the menu-item title doesn't work, nor does "icon:". Icons was originally set to false up in that first part. I set it to true which made space for the icons. Just can't figure out how to get them in there.