Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove the Context Menu in TinyMCE

TinyMCE has a built-in contextmenu which activates when you right-click in the content editor area. I need to remove this menu due to the copy/cut/paste in the menu. It for an application specific reason and less of a technical reason.

enter image description here

I have attempted to remove the contextmenu plugin as well as attempt to catch the contextmenu event and trap it without luck.

like image 724
Chris Schuld Avatar asked Mar 01 '12 00:03

Chris Schuld


People also ask

How do you get rid of the menu bar on TinyMCE?

To disable the menu bar, the menubar option should be provided a boolean value of false .

Is TinyMCE responsive?

The TinyMCE editor can be made responsive by using css media queries. Simply add css rules that set the width property of table.

How do I use TinyMCE init?

Initialize TinyMCE 5 on any element (or elements) on the web page by passing an object containing a selector value to tinymce. init() . The selector value can be any valid CSS selector. For example: To replace <textarea id="mytextarea"> with a TinyMCE 5 editor instance, pass the selector '#mytextarea' to tinymce.


1 Answers

The easy solution is to remove the contextmenu plugin in your tinymce init:

 plugins : "inlinepopups,insertdatetime,fullscreen,contextmenu",

becomes

 plugins : "inlinepopups,insertdatetime,fullscreen",
like image 70
Thariama Avatar answered Sep 29 '22 10:09

Thariama