Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
751 views
in Technique[技术] by (71.8m points)

javascript - 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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

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

becomes

 plugins : "inlinepopups,insertdatetime,fullscreen",

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...