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

@package-reviewer/markdown-math-editor

v1.0.0

Published

A modern markdown editor with LaTeX math support and live preview

Readme

Markdown Math Editor

A modern, feature-rich markdown editor with LaTeX math support and live preview built with React and TypeScript.

Features

  • Split-pane editor - Edit markdown on the left, see live preview on the right
  • 🔢 LaTeX Math Support - Insert and render mathematical equations using LaTeX syntax
  • 🎨 Modern UI - Beautiful, clean interface built with Tailwind CSS and shadcn/ui
  • 📝 Rich Toolbar - Format text with bold, italic, headings, lists, code blocks, tables, and more
  • Real-time Preview - See your markdown rendered instantly as you type
  • 🎯 TypeScript - Fully typed for better developer experience

Installation

npm install @your-org/markdown-math-editor
# or
yarn add @your-org/markdown-math-editor
# or
pnpm add @your-org/markdown-math-editor

Usage

1. MarkdownEditor Component

Use the editor component to allow users to edit markdown content:

import { MarkdownEditor } from '@your-org/markdown-math-editor';
import '@your-org/markdown-math-editor/styles';

function App() {
  const [content, setContent] = useState('');

  return (
    <MarkdownEditor
      value={content}
      onChange={setContent}
      title="My Editor"
      className="h-screen"
    />
  );
}

2. RenderInline Component

Use the render component to display markdown content:

import { RenderInline } from '@your-org/markdown-math-editor';
import '@your-org/markdown-math-editor/styles';

function Preview({ markdown }: { markdown: string }) {
  return (
    <div>
      <RenderInline content={markdown} />
    </div>
  );
}

API Reference

MarkdownEditor Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | value | string | '' | The markdown content to edit | | onChange | (value: string) => void | - | Callback fired when content changes | | title | string | 'Markdown Editor' | Optional title displayed at the top | | className | string | - | Additional CSS classes |

RenderInline Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | content | string | '' | The markdown content to render | | style | React.CSSProperties | - | Optional inline styles | | className | string | - | Additional CSS classes |

Examples

Basic Editor

import { useState } from 'react';
import { MarkdownEditor } from '@your-org/markdown-math-editor';

function MyEditor() {
  const [markdown, setMarkdown] = useState('# Hello World\n\nThis is **bold** text.');

  return (
    <MarkdownEditor
      value={markdown}
      onChange={setMarkdown}
    />
  );
}

Display Only (Read-only)

import { RenderInline } from '@your-org/markdown-math-editor';

function Article({ content }: { content: string }) {
  return (
    <article>
      <RenderInline content={content} />
    </article>
  );
}

With Math Support

The editor supports LaTeX math expressions:

# Math Example

Inline math: \\(E = mc^2\\)

Display math:
\\[
\\int_{-\\infty}^{\\infty} e^{-x^2} dx = \\sqrt{\\pi}
\\]

Styling

The package uses Tailwind CSS. Make sure to include the styles:

import '@your-org/markdown-math-editor/styles';

Or import the CSS file in your main entry:

import '@your-org/markdown-math-editor/dist/index.css';

Requirements

  • React 18+ or React 19+
  • Tailwind CSS (for styling)
  • shadcn/ui components installed (Button, Input, Label, Textarea)
  • Guppy Math Editor files (see setup below)

Guppy Math Editor Setup

The math editor requires Guppy files to be available. Copy the guppy folder to your public directory:

public/
  guppy/
    guppy.min.js
    guppy_osk.min.js
    guppy-default.min.css
    guppy-default-osk.min.css
    sym/
      symbols.json
    (other guppy files)

Include in your HTML:

<link rel="stylesheet" href="/guppy/guppy-default.min.css" />
<link rel="stylesheet" href="/guppy/guppy-default-osk.min.css" />
<script src="/guppy/guppy.min.js"></script>
<script src="/guppy/guppy_osk.min.js"></script>

Note: Guppy files are not included in this package. You can download them from Guppy's repository or copy from your existing project.

License

MIT