Skip to content

Use remark-mdx only to parse jsx syntax #2357

Answered by ChristianMurphy
Specy asked this question in Q&A
Discussion options

You must be logged in to vote

TL;DR if you want to support untrusted user generated content, consider using one of the first to suggestions from my initial reply:

  1. web components/custom elements https://developer.mozilla.org/en-US/docs/Web/API/Web_Components/Using_custom_elements
  2. markdown directives https://github.com/remarkjs/remark-directive

I've looked a bit the mdx website and I'm a bit confused about what it can do.

It is a language, which mixes Markdown and JSX.
It compiles MDX down into a JavaScript file with hyperscript functions, that JavaScript output is portable across frameworks (React, Vue, Svelte, etc) and across runtimes (browser, node, deno, etc).

It also supports the remark, rehype, and recma ecos…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@Specy
Comment options

@ChristianMurphy
Comment options

Answer selected by Specy
@Specy
Comment options

@ChristianMurphy
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants