Monaco editor, missing "Paste" command

If you want to Cut/Paste or Copy/Paste in the Monaco editor, you will find that the "Paste" option is missing in the "Right-Mouse-Click" menu.

If you use "Google" you will find it has been implemented about a year ago, but you will find a lot of discussions as well.

The keyboard shortcut "Ctrl + v" works fine and has to be used.

Any way to add it?

1 Like

What OS and browser are you using?

Windows 10 , chrome...
8IJvZwkP3X

RPi 3b chromium
image

I'm having this problem as well. Accessing it through Firefox 90.0.2 (64-bit) on a Windows 10 PC, but running node-red on various devices.

On windows 8, firefox it doesn't work either.

So this looks like a firefox issue.

There is a plugin

But I cant vouch for it (dont use ff)

EDIT...

@gerry @FireWizard52 @HaroldPetersInskipp
Does the context menu cut/copy/paste operations work in the monaco playground?

1 Like

It's exactly the same in monaco playground.

I tried Win 10 using Firefox 90.0.2 , Edge 92.0.902.62 and Chrome 92.0.4515.131 none have paste.

Did you copy something first?

Yes in all three cases

Most odd. Does that include the playground?

Playground works in Chrome and Edge but not Firefox

In node-red, where the context menu paste command doesn't work for Chrome and edge, are you connected to localhost or a remote instance of node-red? Is it http or Https?

Remote Host, but on local server so have not used https.

Hi,

I tested on several browsers and operating systems.
Find the results below:

  1. Linux OS (PCLinuxOS, kernel 5.13.7) , Firefox 90.0.2 (64-bit) ==> NO Paste command.
  2. Linux OS (PCLinuxOS, kernel 5.13.7) , Waterfox 2021.07==> NO "Right Click Mouse" Menu
  3. Linux OS (PCLinuxOS, kernel 5.13.7) , Chrome 92.0.4515.131 (Official Build) (64-bit) ==> NO Paste command.
  4. Windows 10, Edge ==> NO Paste command.
  5. Windows 10, Firefox 90.0.2 (64-bit) ==> NO Paste command.

Does the context menu cut/copy/paste operations work in the [monaco playground]

  1. Linux OS (PCLinuxOS, kernel 5.13.7) , Firefox 90.0.2 (64-bit) ==> NO Paste command.
  2. Linux OS (PCLinuxOS, kernel 5.13.7) , Chrome 92.0.4515.131 (Official Build) (64-bit) ==> YES

I found the issue is already over 4 years old:

See: Edit actions are available only in IE · Issue #391 · microsoft/monaco-editor · GitHub

In all browsers, Ctrl+X, Ctrl+C and Ctrl+V do what they should do without any prompts.

IE11

  • the context menu will contain Cut, Copy and Paste
  • when running from file:// or from http://localhost , clicking in the context menu works without any prompts.
  • when running from a different origin, clicking in the context menu will prompt and ask the user if they want to grant clipboard access

Edge, Chrome and Firefox

  • the context menu will contain Cut and Copy, and clicking in the context menu works without any prompts.
  • there is no way to trigger paste from a click handler in these browsers.

I didn´t find a solution so far and as it is Microsoft, I do not have much confidence that it will ever work on a non-microsoft system,

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.