markoff icon indicating copy to clipboard operation
markoff copied to clipboard

Autoscroll to last edited position

Open ptzz opened this issue 8 years ago • 2 comments

ptzz avatar Mar 01 '16 15:03 ptzz

This would involve diffing the output HTML and adding some sort of tag with an id, I guess. I wonder how this would affect performance and how bullet proof it's going to be. For instance if the markdown file contains HTML and the last change involves changing an HTML tag then simply inserting another tag will break things. Happy to discuss or even better review a PR.

kaishin avatar Mar 03 '16 10:03 kaishin

Don't know much about HTML rendering but maybe navigate to the closest tag before the first diff in the output HTML? Or even better, if there is some way/api to get an (approximate?) mapping from HTML source line (where first diff is) to vertical position in rendered HTML.

Perhaps some inspiration could be found here.

ptzz avatar Mar 03 '16 21:03 ptzz