tinymce.create("tinymce.plugins.ninja_table",{init:function(n,t){n.addButton("ninja_table",{title:"Add Ninja Tables Shortcode",cmd:"ninja_table_action",image:t.slice(0,t.length-2)+"img/ninja-table-editor-button-2x.png"}),n.addCommand("ninja_table_action",(function(){n.windowManager.open({title:window.ninja_tables_tiny_mce.title,body:[{type:"listbox",name:"ninja_table_shortcode",label:window.ninja_tables_tiny_mce.label,values:window.ninja_tables_tiny_mce.tables}],width:768,height:100,onsubmit:function(t){if(!t.data.ninja_table_shortcode)return alert(window.ninja_tables_tiny_mce.select_error),!1;n.insertContent('[ninja_tables id="'+t.data.ninja_table_shortcode+'"]')},buttons:[{text:window.ninja_tables_tiny_mce.insert_text,subtype:"primary",onclick:"submit"}]},{tinymce})}))}}),tinymce.PluginManager.add("ninja_table",tinymce.plugins.ninja_table);