Monaco Editor for React - use the monaco-editor in any React application without needing to use webpack (or rollup/parcel/etc) configuration files / plugins
I'm trying to implement the sync scroll for markdown preview such as https://markdownlivepreview.com
So, the goal is "when the editor scrolling down or up, then the preview will follow".
I'm trying to implement the sync scroll for markdown preview such as https://markdownlivepreview.com So, the goal is "when the editor scrolling down or up, then the preview will follow".
and referring to this
initScrollBarSync
https://github.com/tanabe/markdown-live-preview/blob/main/public/js/main.js#L143 but still not luck.How do we implement it using this react monaco editor?
Here is my below snippets:
Then in
handleEditorDidMount
: