Reputation: 425
I just want to remove File Edit Insert View options from the menu in TinyMCE Editor.
I try using inspect element and using below javascript code to delete the menu row:
document.getElementById('tinymce-16').style.display = 'none';
but it doesnt work. I get error
Uncaught TypeError: Cannot read property 'style' of null
Upvotes: 0
Views: 1091
Reputation: 927
It is actually quite simple. You need to specify what you want displayed on initialization of the editor.
HTML
<form>
<textarea></textarea>
</form>
JS
tinymce.init({
selector: 'textarea',
plugins: [
"code table"
],
menubar: "format table tools",
});
This will only display format, table and tools. See this DEMO
Upvotes: 1