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

hasancode-math-editor

v1.0.7

Published

A powerful, rich-text math editor component for React built on top of Tiptap, Shadcn UI, and Tailwind CSS. It provides a beautiful interface for writing both standard rich text and advanced mathematical equations (LaTeX) with live previews.

Readme

hasancode-math-editor

A powerful, rich-text math editor component for React built on top of Tiptap, Shadcn UI, and Tailwind CSS. It provides a beautiful interface for writing both standard rich text and advanced mathematical equations (LaTeX) with live previews.

Features

  • ✍️ Rich Text Editing: Bold, italic, underline, strikethrough, highlights, blockquotes, code blocks, lists, and headings.
  • 🧮 Advanced Math Support: Write complex equations via LaTeX with a built-in mathematics extension. Includes a math popover with categorized symbol insertion (Common, Accents, Greek Letters, Logic & Sets, etc.).
  • 📊 Table Management: Easily create and manage tables, add/delete rows/columns, and toggle header cells using the interactive table controls.
  • 🎨 Beautiful UI: Modern, sleek interface built with Shadcn UI and Tailwind CSS.
  • 🔗 Media & Links: Insert hyperlinks and images seamlessly.
  • 🔄 History: Built-in Undo and Redo functionality.
  • 📱 Responsive: fully responsive and works well across different screen sizes.

Installation

Install the package via npm, yarn, or pnpm:

npm install hasancode-math-editor

or

yarn add hasancode-math-editor

or

pnpm add hasancode-math-editor

Peer Dependencies

Ensure you have React and React DOM installed in your project:

npm install react react-dom

Usage

Here is a basic example of how to integrate math-editor into your React application:

import { useState } from "react";
import { Editor } from "hasancode-math-editor";

// Important: Import the package styles for the UI and Tailwind classes to work
import "hasancode-math-editor/style.css";

function App() {
    const [content, setContent] = useState(
        "<p>Welcome to the math editor!</p>",
    );

    return (
        <div className="max-w-4xl mx-auto py-8">
            <Editor content={content} setContent={setContent} />

            <div className="mt-8 p-4 bg-gray-50 rounded-md border">
                <h3 className="font-semibold mb-2">HTML Output:</h3>
                <code>{content}</code>
            </div>
        </div>
    );
}

export default App;

API Reference

<Editor /> Props

| Prop | Type | Required | Description | | ------------ | --------------------------- | -------- | ------------------------------------------------------------------------- | | content | string | Yes | The initial HTML content to be loaded into the editor. | | setContent | (content: string) => void | Yes | Callback fired whenever the editor content changes. Receives HTML string. |

License

This project is licensed under the MIT License - see the LICENSE file for details.