Skip to content

Commit 8c05a6c

Browse files
committed
Completely disable menu.
1 parent 0c9cb4f commit 8c05a6c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

example/components/chakra-markdown.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ const ChakraMarkdown = React.memo<any>(({ content }) => {
4646
glyphMargin: false, // Hide the glyph margin (left margin with icons)
4747
contextmenu: false, // Disable default context menu
4848
}}
49+
onMount={(editor, monaco) => {
50+
// Disable the right-click context menu
51+
editor.onContextMenu((e) => {
52+
e.event.preventDefault(); // Prevent default context menu
53+
});
54+
}}
4955
/>
5056
</Box>
5157
);

0 commit comments

Comments
 (0)