Skip to content

Commit cac2af7

Browse files
committed
Update CodeEditor options
1 parent f128f78 commit cac2af7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/react-renderer-demo/src/app/src/components/mdx/mdx-components.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,20 @@ const MdxComponents = {
7272
theme="tomorrow_night"
7373
name="UNIQUE_ID_OF_DIV"
7474
editorProps={{ $blockScrolling: true }}
75-
value={children}
75+
value={children.replace(/\n+$/, '')}
7676
fontSize={14}
7777
maxLines={Infinity}
7878
showPrintMargin={false}
79-
showGutter={true}
79+
showGutter={false}
8080
highlightActiveLine={false}
8181
style={{ width: '80%', margin: 10 }}
8282
setOptions={{
83-
showLineNumbers: true
83+
showLineNumbers: false,
84+
readOnly: true
8485
}}
8586
onLoad={(editor) => {
8687
editor.getSession().setUseWorker(false);
88+
editor.renderer.$cursorLayer.element.style.display = 'none';
8789
}}
8890
/>
8991
</div>

0 commit comments

Comments
 (0)