Javascript 向TinyMCE自定义菜单添加图标

Javascript 向TinyMCE自定义菜单添加图标,javascript,wordpress,tinymce,Javascript,Wordpress,Tinymce,我正在修改一个插件,它在WP中添加了一个自定义TinyMCE菜单。我需要能够添加图标到下拉菜单项和子菜单项。我已经启用了图标,这在HTML中为它们添加了空间,但无法找到将它们放入的JS createControl:function(d,e){if(d=="ss_button"){d=e.createMenuButton("ss_button",{title:"SS Shortcodes",image:"../wp-content/plugins/ss-shorts/js/images/short

我正在修改一个插件,它在WP中添加了一个自定义TinyMCE菜单。我需要能够添加图标到下拉菜单项和子菜单项。我已经启用了图标,这在HTML中为它们添加了空间,但无法找到将它们放入的JS

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();

添加图像:在菜单项标题之前或之后不起作用,“图标:”也不起作用。图标最初在第一部分设置为false up。我将其设置为true,这为图标留出了空间。只是不知道如何把它们放进去。

我意识到我可以使用菜单项类将图标添加为背景图像。不雅观,但实用