You can specify the βmenuβ and βmenuβ options when you call tinymce.init () to add a new menu item to a modern theme.
I tried and it works.
You can check out the live demo at http://fiddle.tinymce.com/39eaab/1 with TinyMCE 4.1.7.
<script type="text/javascript"> tinymce.init({ selector: "textarea", menu : { file : {title : 'File' , items : 'newdocument'}, edit : {title : 'Edit' , items : 'undo redo | cut copy paste pastetext | selectall'}, insert : {title : 'Insert', items : 'link media | template hr'}, view : {title : 'View' , items : 'visualaid'}, format : {title : 'Format', items : 'bold italic underline strikethrough superscript subscript | formats | removeformat'}, table : {title : 'Table' , items : 'inserttable tableprops deletetable | cell row column'}, tools : {title : 'Tools' , items : 'spellchecker code'}, newmenu: {title : 'New Menu', items : 'newmenuitem'} }, menubar: 'file edit newmenu', setup: function(editor) { editor.addMenuItem('newmenuitem', { text: 'New Menu Item', context: 'newmenu', onclick: function () { alert('yey!'); } }); } }); </script> <form method="post" action="dump.php"> <textarea name="content"></textarea> </form>
source share