BoostNote-App icon indicating copy to clipboard operation
BoostNote-App copied to clipboard

Markdown preview is not scrolling along with editor

Open dwivedikunal100 opened this issue 4 years ago • 3 comments

Current behavior

Markdown preview is not scrolling along with editor

Expected behavior

The preview should scroll up or down along with the editor,to view section of the document currently being edited.

Steps to reproduce

  1. Run the app on Mac OS
  2. Write enough lines to make document have lines more than screen can display
  3. Scroll down to different section of the document

Environment

  • Version :0.1.2
  • OS Version and name :Mac OS,10.14.6

dwivedikunal100 avatar Dec 31 '19 05:12 dwivedikunal100

It is not implemented yet. Thanks for the reminding!

Rokt33r avatar Jan 05 '20 23:01 Rokt33r

@Rokt33r I believe this requires each (top-level) elements in the generated HTML in preview has a data-line references back to its source. Do you think we have that with remarkjs yet?

I took a look at the legacy version and saw the token walk to add data-line, but could not find anything similar in the next version

thien-do avatar Aug 21 '20 23:08 thien-do

@dvkndn We can access a node's actual position in raw text. I've been slowly working on it. https://github.com/rehypejs/rehype-react/pull/22

Rokt33r avatar Sep 01 '20 07:09 Rokt33r