npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ra-mdx-editor

v0.1.1

Published

A React Admin input component for MDXEditor

Downloads

99

Readme

ra-mdx-editor

MUI-aligned markdown components for react-admin powered by MDXEditor.

Exports

  • MdxInput: rich MDX editor input for Create and Edit forms
  • MdxField: read-only markdown renderer for Show layouts
  • defaultInputPlugins: default plugin preset used by MdxInput
  • defaultFieldPlugins: default plugin preset used by MdxField

Installation

npm install ra-mdx-editor @mdxeditor/editor

You also need the standard react-admin + MUI stack in your app.

Quick Start

import {
  Edit,
  Show,
  SimpleForm,
  SimpleShowLayout,
  TextInput,
  TextField,
} from 'react-admin'
import { MdxInput, MdxField } from 'ra-mdx-editor'
import '@mdxeditor/editor/style.css'

export const PostEdit = () => (
  <Edit>
    <SimpleForm>
      <TextInput source="title" />
      <MdxInput source="body" />
    </SimpleForm>
  </Edit>
)

export const PostShow = () => (
  <Show>
    <SimpleShowLayout>
      <TextField source="title" />
      <MdxField source="body" />
    </SimpleShowLayout>
  </Show>
)

MUI-Like Editing Experience

MdxInput now ships with:

  • MUI-style focus ring, error border, and disabled state
  • toolbar + content spacing aligned with MUI form controls
  • RA-aware label/validation/helper text behavior

Customizing Plugins

import { MdxInput, defaultInputPlugins } from 'ra-mdx-editor'
import { headingsPlugin } from '@mdxeditor/editor'

<MdxInput
  source="body"
  mdxProps={{
    plugins: [
      ...defaultInputPlugins,
      headingsPlugin({ allowedHeadingLevels: [1, 2] }),
    ],
  }}
/>
import { MdxField, defaultFieldPlugins } from 'ra-mdx-editor'
import { headingsPlugin } from '@mdxeditor/editor'

<MdxField
  source="body"
  plugins={[...defaultFieldPlugins, headingsPlugin({ allowedHeadingLevels: [2, 3] })]}
/>

API Notes

MdxInput accepts react-admin input props (source, label, validate, required, readOnly, etc.). Pass MDXEditor-specific props via mdxProps.

mdxProps accepts MDXEditor props except:

  • markdown
  • onChange
  • onBlur
  • onError
  • ref
  • readOnly
  • spellCheck

Those are controlled by MdxInput to keep the editor in sync with react-admin form state.

MdxField accepts standard react-admin field props plus MDXEditor props (except markdown, readOnly, and ref).

  • MdxField defaults to defaultFieldPlugins
  • MdxInput defaults to defaultInputPlugins
  • MdxField supports emptyText when the source value is missing

TypeScript helper types are also exported:

  • MdxInputProps
  • MdxFieldProps

Publishing

This package is intended for npm publishing via GitHub Releases (.github/workflows/publish.yml).

Recommended pre-release checklist:

  1. npm run lint
  2. npm run test
  3. npm run build
  4. bump version in package.json
  5. create a GitHub release

Example App

Run the bundled example:

npm install
npm run build
cd example
npm install
npm run dev