monaco-react icon indicating copy to clipboard operation
monaco-react copied to clipboard

looks like contextmenu option not working with nextjs13?

Open lossmaster opened this issue 1 year ago • 0 comments

import { editor } from 'monaco-editor';
import Editor, {Monaco, useMonaco, loader , EditorProps} from '@monaco-editor/react';//DiffEditor,
......
      <Editor
        //height="100vh"
        defaultLanguage="plaintext"
        defaultValue={!fileContent?"":fileContent}
        keepCurrentModel={true}
        beforeMount={handleEditorWillMount}
        onMount={handleEditorDidMount}
        onChange={handleContentChange}
        options={{
          lineNumbers: 'off',
          contextmenu: true,       
          roundedSelection: true,
          cursorStyle: "line",
          automaticLayout: true,
          selectOnLineNumbers: true,
          wordWrap: "off",
          fontSize: 18,
          minimap: {
            enabled: false,
          },
          suggest: {},
        }}
      />

as snippet from my nextjs project show above i want to turn on/off the "contextmenu" option to enable/disable the default monaco editor's contextmenu ,but nothing showed or changed except the brower's context menu pop when i right click in mocaco editor area.

dependencies are list below:

    "@monaco-editor/react": "^4.6.0",
    "monaco-editor": "^0.44.0",
    "next": "^13",
    "react": "^18",

lossmaster avatar Jul 30 '24 07:07 lossmaster