Post-processing textual content with typeset js #1487
-
I'm interested in using Typeset js as part of a pipeline for MDX, to improve some visual elements in markdown running text. I've read through a few examples of how to create plugins (e.g. unified JS plugins) for different parts of the MDX system, but I'm still a little puzzled what the best way to proceed here would be, since there are several ways to hook into the rendering. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
you're right, Typeset wants to work with static HTML. |
Beta Was this translation helpful? Give feedback.
-
It really depends on what you want to do. |
Beta Was this translation helpful? Give feedback.
It really depends on what you want to do.
The closest to textual dom nodes MDX gets is the hast+mdx phase https://mdxjs.com/advanced/ast
which can be accessed with rehype plugins https://mdxjs.com/advanced/plugins
Unified/MDX provides a guide on creating plugins here: https://unifiedjs.com/learn/