Remarkable icon indicating copy to clipboard operation
Remarkable copied to clipboard

More thoughts on keeping preview at right place.

Open jonbcooper opened this issue 1 month ago • 2 comments

I have been reading the excellent summary of this issue (#427). Someone (ciri) made the great suggestion to use the following command at the end of the markdown to make the preview move to the desired position. The big number will make it move to the end so you have to find the right number by testing if you want it to go somewhere else.

<script> window.scroll(0,200000) </script>

A variation on that theme is to put in an invisible html identifier in a blank line wherever you are working in the document e.g. "active" as below:

<p id="active"></p>

If you change the window scroll script to:

<script> window.document.getElementById("active").scrollIntoView({block: "center"}) </script>

That will always keep the active paragraph in the centre of the preview window. You can change it to say {block: "start"} if you want the top of the active paragraph at the top of the screen.

There is a bit more info on the scrollIntoView() method here.

When you work on a different paragraph, just cut and paste the <p id="active"></p> to that part of the document.

You can also add the identifier to a subtitle in markdown as follows: #### My subtitle {#active}.

I am sure we can do more with this!

[EDIT. I have just seen that #434 addresses the problem by doing essentially the same thing in python. Nice one.]

jonbcooper avatar Nov 28 '25 03:11 jonbcooper

A bit more on this here along with a version of RemarkableWindow.py which does the above automatically. Very happy with the result anyway!

jonbcooper avatar Dec 02 '25 01:12 jonbcooper

A few more updates here with a fix for exporting styled pdf files. Hope some of this helps.

jonbcooper avatar Dec 03 '25 02:12 jonbcooper