Expose raw html / allowDangerousHtml
to the MyST CLI
#1040
Labels
enhancement
New feature or request
allowDangerousHtml
to the MyST CLI
#1040
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}
?The text was updated successfully, but these errors were encountered: