Reputation: 15925
I understand that it's possible to configure the submenu items within TinyMCE as shown below:
tinymce.init({
selector: "textarea",
menu : { // this is the complete default configuration
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 deletetable | cell row column'},
tools : {title : 'Tools' , items : 'spellchecker code'}
},
plugins: [
"advlist autolink lists link image charmap print preview anchor",
"searchreplace visualblocks code fullscreen",
"insertdatetime media table contextmenu paste"
],
toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"
});
but is there someplace with a list of all the submenu items? The TinyMCE documentation only seems to show the top level (file, edit, insert, etc.) but not the list of submenu items. There are a couple of examples but they only show subsets. I've tried to look at the source code but it's pretty involved...
Upvotes: 3
Views: 635
Reputation: 15925
In retrospect the answer is very obvious, but when you initially start it's not. It also doesn't help that the code is well below the fold, so you will need to scroll down to see the code instead of just the list.
You can find a mostly complete list at: https://www.tinymce.com/docs/plugins What you need to do is add the plugins and then add the items.
For example here is the link for the image (Remember to scroll to the bottom):
tinymce.init({
selector: "textarea", // change this value according to your HTML
plugins: "image",
menubar: "insert",
toolbar: "image",
image_prepend_url: "http://www.tinymce.com/images/"
});
In this case you need to add the image
to plugins
. It will by default add it to the menubar insert
. You can however manually add it by entering in image
.
Upvotes: 3