Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make side-by-side markdown preview scroll with its editor

I've got a Markdown editor on the left side and its HTML preview on the right side.

How do I make the preview scroll to the same location as the editor.

like image 532
Hedge Avatar asked Feb 11 '23 14:02

Hedge


1 Answers

The Remarkable library use a complex scroll sync for the demo : https://github.com/jonschlinkert/remarkable/blob/dev/demo/assets/index.js#L213

like image 57
jmgross Avatar answered Feb 13 '23 04:02

jmgross