Skip to content

Commit 74636a4

Browse files
committed
Disable not needed functions in monaco editor
1 parent e9d0687 commit 74636a4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

example/components/chakra-markdown.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const ChakraMarkdown = React.memo<any>(({ content }) => {
1818
),
1919
code: ({ inline, children, className }) => {
2020
const language = className ? className.replace('language-', '') : 'plaintext';
21-
const code = String(children);
21+
const code = String(children).trim();
2222
if (inline) {
2323
return <Text as="code" bg={useColorModeValue("gray.100", "gray.700")} p="1" borderRadius="md">{code}</Text>;
2424
}
@@ -40,6 +40,10 @@ const ChakraMarkdown = React.memo<any>(({ content }) => {
4040
scrollBeyondLastLine: false,
4141
lineNumbers: "off",
4242
scrollbar: { vertical: 'hidden' },
43+
overviewRulerLanes: 0, // Disable the overview ruler
44+
hideCursorInOverviewRuler: true, // Hide cursor in the ruler
45+
folding: false, // Disable code folding
46+
glyphMargin: false, // Hide the glyph margin (left margin with icons)
4347
}}
4448
/>
4549
</Box>

0 commit comments

Comments
 (0)