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

@bojidar-bg/tina-mdx-editor

v0.1.1

Published

An alternative markdown editor for TinaCMS built on top of MDXEditor

Readme

MDXEditor for TinaCMS

Do you want a better Markdown editor for your TinaCMS-powered site? Perhaps one which allows for resizing images? And looking at differences from the previous version of the article? And harnesses all the other amazing features of MDXEditor?

Well, you are in the right place!

Usage

To use this editor in your TinaCMS schema, you can import it in your tina/config.ts file and use it like so:

import { defineConfig, wrapFieldsWithMeta } from "tinacms";
import { MDXEditorField, MDXEditorFieldProps } from "@bojidar-bg/tina-mdx-editor";

export default defineConfig({
  // ... Other config options
  schema: {
    collections: [
      // ... Other collections
      {
        // ... Collection config
        fields: [
          // ... Other fields
          {
            type: "string",
            name: "body",
            label: "Body",
            isBody: true,
            ui: {
              component: wrapFieldsWithMeta(MDXEditorField)
            }
          },
        ],
      },
    ],
  },
});

Customizing

The MDXEditorField comes with a default set of MDXEditor plugins and toolbar elements configured. You should be able to customize those as follows:

// custom.tsx
import { BlockTypeSelect, BoldItalicUnderlineToggles, CreateLink, DiffSourceToggleWrapper, InsertThematicBreak, ListsToggle, UndoRedo, diffSourcePlugin, headingsPlugin, imagePlugin, linkDialogPlugin, linkPlugin, listsPlugin, quotePlugin, thematicBreakPlugin, toolbarPlugin } from '@mdxeditor/editor';
import { MDXEditorField, MDXEditorFieldProps, InsertTinaImage } from "@bojidar-bg/tina-mdx-editor";

export const CustomMDXEditorField = (props: MDXEditorFieldProps) => {
  return <MDXEditorField 
    {...props}
    // You can override just the toolbar contents...
    toolbarContents={() => <>
      <UndoRedo />
      <DiffSourceToggleWrapper>
        <BlockTypeSelect />
        <BoldItalicUnderlineToggles />
        <CreateLink />
        <InsertTinaImage />
        <ListsToggle options={['bullet', 'number']} />
        <InsertThematicBreak />
      </DiffSourceToggleWrapper>
    </>}
    // ...or the whole plugins array
    plugins={({meta, toolbarContents}) => [
      headingsPlugin(),
      quotePlugin(),
      listsPlugin(),
      thematicBreakPlugin(),
      toolbarPlugin({toolbarContents}),
      linkPlugin(),
      linkDialogPlugin(),
      imagePlugin({
        imageUploadHandler: null,
        allowSetImageDimensions: true,
      }),
      diffSourcePlugin({
        diffMarkdown: meta.initial
      })
    ]}
  />;
};

// then, use CustomMDXEditorField instead of MDXEditorField in the example from before

If you get a "top-level await is not available in the configured target environment" error related to importing @mdxeditor/editor from your Tina config.ts, you can work around it by:

  1. Creating a new folder
  2. Moving the custom.tsx file into that folders—this is the file that will be loaded by the browser.
  3. Creating an extra dummy.tsx file which will be loaded by Tina's esbuild. It can contain something like:
import { MDXEditorField } from "@bojidar-bg/tina-mdx-editor";
export const CustomMDXEditorField = MDXEditorField;
  1. Creating a package.json file in the new folder, with the following content:
{
  "main": "dummy.tsx",
  "browser": "custom.tsx"
}
  1. Finally, adjust your own config.ts to import the whole folder.

Credits

This package was initially created as part of tina-true-selfhosted-example.

@mdxeditor/editor is awesome!