Replies: 2 comments 5 replies
-
Hi @PaulHax - the myst plugin is the way to go for the directive as you suggest. For the frontend, the best way would be to also use a myst plugin to add a renderer. The issue there though is that we don't yet have renderer plugin loading fully fleshed out so it's not currently possible to load them, custom renderers can be added to the theme though. In either case that would be preference over markdown-it. Do you have an example of your image viewer in a page, to better understand what's needed? |
Beta Was this translation helpful? Give feedback.
-
To build on @stevejpurves point - I'd check out the MyST plugins documentation as it has many examples that show off how to build things like this. Maybe that is a starting point to meet your use case. |
Beta Was this translation helpful? Give feedback.
-
Humbly requesting guidance on how to insert our scientific file format image viewer into a scipy paper MyST document: scipy-conference/scipy_proceedings#927
I'd like to build a reusable recipe/plugin for other MyST efforts. The image viewer is implimented as an HTML custom element. I'd need to replace the markdown directive with the custom tag, ie
<itk-viewer-3d></itk-viewer-3d>
, get a ref to that element, and run some JavaScript, ieviewer.setImage(new ZarrMultiscaleSpatialImage(documentRelativeImageUrl))
. <- seems like the job of amarkdown-it
plugin to insert client side JS, not a Myst plugin?Or should I do something with the
iframe
directive?Any advice or links to a project I can use as a template would be great.
Beta Was this translation helpful? Give feedback.
All reactions