How to embed live code editor for React components in MDX docs

This page summarizes the projects mentioned and recommended in the original post on dev.to

SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
surveyjs.io
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
  • remark-mdx-code-meta

    Discontinued A remark MDX plugin for using markdown code block metadata

  • Let's get started from customizing unified pipeline to support the live argument after the triple backtick (code fence) and the name of language. Install remark-mdx-code-meta to do so.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • react-live

    A flexible playground for live editing React components

  • We depend on react-live for preview and editor.

  • prism-react-renderer

    🖌️ Renders highlighted Prism output to React (+ theming & vendored Prism)

  • For non-live codeBlock, you may want to render it by prism-react-renderer which is working also under the LiveEditor. I'm not sure what is the best way to share the style and theme between them but do so anyhow.

  • Docusaurus

    Easy to maintain open source documentation websites.

  • LivePreview is not server-rendered so a layout shift occurs, though LiveEditor seems to support SSR. You should refer to Docusaurus Live Codeblock theme for more solid implementation including fallback on the server. Also, see the issue about SSR

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Modern React testing, part 5: Playwright

    5 projects | dev.to | 6 May 2024
  • Docusaurus doesn't recognize brackets {} on the markdown files

    1 project | dev.to | 1 Apr 2024
  • Looking for open source documentation generator

    1 project | news.ycombinator.com | 28 Mar 2024
  • Community project: PreventRansomware.io

    2 projects | /r/cybersecurity | 6 Dec 2023
  • Docusaurus Rocks!

    3 projects | dev.to | 29 Oct 2023