Open alanhe421 opened 4 years ago
@alanhg, right now the links in preview do not scroll the source. I will add it but it will work for JavaFX WebVIew preview, not Swing browser which does not do source/preview synchronization.
Another way to navigate is to use the TOC gutter icon to jump to heading:
I am also considering adding gutter icons in the TOC for each line entry in it for quicker navigation.
Another way is to use the structure view. Set it to headings only or headings and tasks in Languages & Frameworks > Markdown:
For headings only you get all headings in document which you can navigate to/from source by setting the sync state for the structure view :
Setting structure view type to Headings and Tasks shows the headings with the task list items under the heading. I use it for todo lists using markdown task list items instead of IDE todo which requires comments:
Expecting you to add this feature @vsch
@alanhg, which feature exactly?
Click on preview link scrolling source or TOC heading line elements having a gutter icon?
Both are on the back burner until I have a release compatible with 2019.3
@vsch Click on preview link scrolling source
@alanhg, you can expect it but it will not work for you even if I add it because you are using Swing preview browser. It would only work for JavaFX WebView preview because scroll sync does not work for Swing.
@vsch OK,Why are there two different preview browser and what is the difference between them.
@alanhg, historical and practical reasons. JavaFX WebView was not available on all systems and was not very stable before 1.8u40 but it had JavaScript support and CSS so was much easier to work with and generate the desired look. Today it is solid.
Swing browser is extremely limited. I don't think it has HTML/CSS 3.0 fully supported. No Java script. But it is native to the UI in the IDE so it is fast. Swing is used for all UI in the IDE so using swing makes it easier to preview what the HTML will look like in plugin descriptions for example.
I only use Swing for previewing HTML that will be displayed by Swing browser in the IDE. Other than that it is too limited. It does however have newer Unicode characters implemented than JavaFX WebView, last I checked.
With JavaFX WebView you have fenced code syntax highlighting, Katex math equations, Mermaid charts, Admonition extension, etc. Anything that uses JavaScript can run in the browser. It is the supported preview browser for the plugin and JetBrains Markdown Support only has JavaFX WebView preview. Swing in Markdown Navigator is there as a fall back.
The bundled JRE has JavaFX WebView so it should be able to run on all Systems:
When I click the toc's link, can the source also jump to the corresponding position, is there any quick setting?