Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

looks like contextmenu option not working with nextjs13? #637

Open
lossmaster opened this issue Jul 30, 2024 · 0 comments
Open

looks like contextmenu option not working with nextjs13? #637

lossmaster opened this issue Jul 30, 2024 · 0 comments

Comments

@lossmaster
Copy link

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",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant