Open guanglinn opened 1 month ago
I am sorry for not noticing those closed issues.
This is an advanced feature for Markor, but I noticed that Visual Studio Code does well in Markdown scroll sync, the code of this feature is here vscode/extensions/markdown-language-features/preview-src/scroll-sync.ts, and the related issue from VSCode Support to scroll markdown preview with source scrolling.
It may be a very valuable reference for us to analyze its principle and implementation. @gsantner @harshad1
https://github.com/user-attachments/assets/0303b233-d950-497d-a9e9-fbce537cdfe9/
To this end every node in the markdown html now has a line=# attribute. This should be sufficient to jump when going back and forth if handled well, I think
Unfortunatley it's though markdown specific and next up people cry out when it is ""broken/unavailable/not works"" for other formats. It's not generic solveable in easy way
I think it is feasible on Markor to a certain extent, maybe we can try to implement it on Markdown first.
If we master the implementation of the feature principle in code and it works well, then it could be easily implemented for other formats.
⚠️ This issue respects the following points: ⚠️
Description
This is a feature request.
Hope Markor supports scroll synchronization between markdown preview in view-mode and its source code in edit-mode.
Information
Android version: Android 12 Device: Huawei Nova 8 App Version: 2.12.5 (code 154)
Source
GitHub Releases
Format / File type
Markdown
Additional info / Log