Open rohan220217 opened 1 year ago
https://microsoft.github.io/monaco-editor/playground.html?source=v0.40.0#XQAAAAKZAQAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscwztL3RgmSaumWUF-TBOsVJ4S4FwfCDQb5-2uUHXTVAefbVSd9IzaZ_vv9VR9KugsKimARHSWlrTPOQHROITHxmAeFEs9_m3VHdSe7_Etv6Wpgzto0GSqI-Jbjpg6g3FsuE6sHNUsN9V6wL_ETQPRnm_0aVo0fnziUFXcOKdl1dN60w7lo6ksZk1GRLNRnJzi9yrBvdxj-pa6H0kcgR-V1FdTlNpR7fWF7jGnobpdtU4tU4Ok5mfapbCHRX_5CfbVQlilb4b4QPhbGF5wSQdSxStmNDURCQPPKXXN6-iGReKsXwlrZXF1IfthvhSOF2m1G9p67XrkF8_-693Eg
const value = /* set from `myEditor.getModel()`: */ `function hello() { alert('Hello world!'); alert('Hello world!'); }`; // Hover on each property to see its docs! const myEditor = monaco.editor.create(document.getElementById("container"), { value, language: "javascript", automaticLayout: true, pasteAs: { enabled: false, }, });
Just visited this doc link: https://microsoft.github.io/monaco-editor/docs.html#interfaces/editor.IEditorOptions.html#pasteAs and added in the code but it is not working correctly. I want to disable paste option using ctrl+v
Context menu paste option is disabled after using pasteAs: { enabled: false, }, but ctrl+v is pasting content as usual
pasteAs: { enabled: false, },
It should disable all types of pasting e.g. ctrl+v, context menu paste option, etc...
No response
The same problem
Reproducible in vscode.dev or in VS Code Desktop?
Reproducible in the monaco editor playground?
Monaco Editor Playground Link
https://microsoft.github.io/monaco-editor/playground.html?source=v0.40.0#XQAAAAKZAQAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscwztL3RgmSaumWUF-TBOsVJ4S4FwfCDQb5-2uUHXTVAefbVSd9IzaZ_vv9VR9KugsKimARHSWlrTPOQHROITHxmAeFEs9_m3VHdSe7_Etv6Wpgzto0GSqI-Jbjpg6g3FsuE6sHNUsN9V6wL_ETQPRnm_0aVo0fnziUFXcOKdl1dN60w7lo6ksZk1GRLNRnJzi9yrBvdxj-pa6H0kcgR-V1FdTlNpR7fWF7jGnobpdtU4tU4Ok5mfapbCHRX_5CfbVQlilb4b4QPhbGF5wSQdSxStmNDURCQPPKXXN6-iGReKsXwlrZXF1IfthvhSOF2m1G9p67XrkF8_-693Eg
Monaco Editor Playground Code
Reproduction Steps
Just visited this doc link: https://microsoft.github.io/monaco-editor/docs.html#interfaces/editor.IEditorOptions.html#pasteAs and added in the code but it is not working correctly. I want to disable paste option using ctrl+v
Actual (Problematic) Behavior
Context menu paste option is disabled after using
pasteAs: { enabled: false, },
but ctrl+v is pasting content as usualExpected Behavior
It should disable all types of pasting e.g. ctrl+v, context menu paste option, etc...
Additional Context
No response