Open choldgraf opened 8 months ago
I'd love to have this feature, as I currently cannot use myst for my project because I cannot find a way of adding raw HTML to the page :(
{raw:html}
directive?In this PR we added support for {raw:typst}
and {raw:latex}
directives:
Could that be extended to allow for {raw:html}
?
In the MyST parser library, there's an option called
allowDangerousHtml
that allows the parser to include "raw" HTML that isn't a formal MyST node. This is mentioned on this page:https://mystmd.org/guide/commonmark#valid-html
However, it is unclear in the documentation how to set
allowDangerousHtml
, and I think it is actually not possible from a MyST configuration + CLI system, but only at the command line.It would be useful if this could be exposed to users so that they can embed their own HTML, JS, CSS, etc. This is useful if you want to do things like:
Where is this implemented?
This is an educated guess, but I believe that the
myst-transform
that builds the HTML outputs doesn't use this parameter and thus this functionality is not exposed to users:https://github.com/executablebooks/mystmd/blob/ffb239a921ee90aa8e55c067e243e4213767c6fe/packages/myst-transforms/src/html.ts#L160-L180
Or could it be done with a
{raw:html}
directiveIn this PR we added support for
{raw:typst}
and{raw:latex}
directives:Could that be extended to allow for
{raw:html}
?