Support showing the native context menu (with copy/paste)
See original GitHub issuemonaco-editor version: 0.12.0
Browser: Google Chrome
OS: macOS
Steps or JS usage snippet reproducing the issue:
When disabling context menu (contextmenu: false
), highlighting a text and right clicking it will open context menu with missing actions (Cut/Paste/Copy/Select All)
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:8 (1 by maintainers)
Top Results From Across the Web
AO 2.x: How to show or hide the Cut, Copy & Paste entries in ...
When opening the Context Menu for a cell that belongs to an AO data source, Analysis Office does hide most of the Excel...
Read more >Copy/Paste using the context menu doesn't work - Syncfusion
In Document editor, we use our own context menu to display the Word editor specific menu items. So, retrieving the data from system ......
Read more >How to add a copy/paste context menu to browser element in ...
Connect it to whatever you want, here am making it the context menu of the browser element by giving the id of menu...
Read more >Disable Or Enable Windows 11 Context Menu How To Guide
That also refinement contextual file operations in the right-click context menu, and share dialog shares its design aspects. The context menu is ...
Read more >Creating a React context menu - LogRocket Blog
You can see options like copy, paste, and cut if you highlight text. You may also see customized context menus on email or...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I don’t want to use the custom Monaco menu so i set contextmenu: false. But i want the native browser menu to still be able to copy paste. Is this possible?
Unfortunately in WebKit / Safari, this does allow editing the content of tooltips too (e.g. error messages, hover tooltips).
However, If (like me) you’re only interested in WebKit (e.g. embedding in a native app), I can recommend adding a CSS rule:
This will set
contentEditable
on every view-line individually (which contains only the syntax highlighted text, not the tooltips, etc). It’s not perfect; the class names may change in the future. Just make sure to check if it’s still working every time you update to a newer version of monaco.It also seems compatible with Chrome (tested), Edge and Opera (both untested).