| 9 | import React, { useMemo, useRef } from "react"; |
| 10 | |
| 11 | function defaultEditorOptions(): MonacoTypes.editor.IEditorOptions { |
| 12 | const opts: MonacoTypes.editor.IEditorOptions = { |
| 13 | scrollBeyondLastLine: false, |
| 14 | fontSize: 12, |
| 15 | fontFamily: "Hack", |
| 16 | smoothScrolling: true, |
| 17 | scrollbar: { |
| 18 | useShadows: false, |
| 19 | verticalScrollbarSize: 5, |
| 20 | horizontalScrollbarSize: 5, |
| 21 | }, |
| 22 | minimap: { |
| 23 | enabled: true, |
| 24 | }, |
| 25 | stickyScroll: { |
| 26 | enabled: false, |
| 27 | }, |
| 28 | }; |
| 29 | return opts; |
| 30 | } |
| 31 | |
| 32 | interface CodeEditorProps { |
| 33 | blockId: string; |