(view: EditorView)
| 58 | * Get scroll position from editor view |
| 59 | */ |
| 60 | export function getScrollPosition(view: EditorView): ScrollPosition { |
| 61 | const { scrollTop, scrollLeft } = view.scrollDOM; |
| 62 | return { scrollTop, scrollLeft }; |
| 63 | } |
| 64 | |
| 65 | /** |
| 66 | * Set scroll position in CodeMirror editor view |