Reputation: 628
This question is motivated by the fact that my beloved TikzEdt editor for editing tikz
is no longer supported and that there is a beautiful VS code extension corschenzi.mermaid-graphical-editor
.
Both allow to modify graphics which is reflected in code (tikz or mermaid) and the other way round: code is reflected in graphics, i.e. previewed.
Unfortunatly, the mermaid editor is not open source, so i cannot figure out the technique used.
Also I only have basic knowledge of typescript/javascript. Who can give me a hint?
Upvotes: 0
Views: 629
Reputation: 3303
In order to have such viewer/editor, you would probably need to dig into WebView API (https://code.visualstudio.com/api/extension-guides/webview), which allows you to embed a webpage/webapp, customizing not only the rendering but persistence as well.
I'm not sure there is a JS lib/online service that provides you WYSIWYG for Tizk files, but if there is, you may be able to use inside your WebView. Otherwise, you should create your own. For this, you should need JS/TS knowledge, unless you have some Wasm solution available, as a shortcut.
Upvotes: 0