microsoft / microsoft/monaco-editor

Paste menu item doesn't work in sandboxed item

Open
#2,264 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request help wanted integration
Dominant language
JavaScript
Stars
46.8k
Forks
4.1k
Avg merge
17h 58m
Merged PRs (30d)
1

Description

We use monaco editor in an iframe sandbox that doesn't permit the navigation.clipboard API. (We don't own the parent frame).
So the ctrl + V paste option work but the Paste option in the context menu doesn't work because the frame doesn't allow it.

Is it possible to change the implementation of the paste menu context item so it'll work like the ctrl + v shortcut?
Paste menu item:
image

Sandbox:
pic2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the context-menu Paste item and compare it with the ctrl+V shortcut path in the Monaco editor. Reproduce the issue in a sandboxed iframe without the navigation.clipboard permission; done means the context-menu action works there as the shortcut already does.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.