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

richmoshiur

v1.2.2

Published

A lightweight, fully-typed React rich text editor component with formatting, lists, and link support

Readme

richmoshiur

richmoshiur is a lightweight, fully-typed React rich text editor component built for modern TypeScript applications. It provides a polished editing toolbar with formatting controls, list management, link insertion, and comprehensive type definitions for seamless IDE support.

Banner

richmoshiur banner

Features

  • ✨ Bold, italic, and underline formatting
  • 📝 Ordered and unordered lists
  • 🔗 Inline link insertion with URL validation
  • 📋 Paste handling that preserves plain text content
  • 🎨 CSS module styling for encapsulated editor styles
  • 📦 Full TypeScript support with exported type definitions
  • 🔄 Dual bundle output (ESM and CommonJS)
  • ⚡ Lightweight and optimized for modern React applications

Installation

npm install richmoshiur

Usage

JavaScript

import { useState } from 'react';
import { RichTextEditor } from 'richmoshiur';

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

  return (
    <RichTextEditor
      value={content}
      onChange={setContent}
      placeholder="Start typing..."
    />
  );
}

TypeScript

import { useState } from 'react';
import { RichTextEditor, RichTextEditorProps } from 'richmoshiur';

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

  const handleChange = (newContent: string) => {
    setContent(newContent);
  };

  return (
    <RichTextEditor
      value={content}
      onChange={handleChange}
      placeholder="Start typing..."
    />
  );
}

Props

The RichTextEditor component accepts the following props:

interface RichTextEditorProps {
  /** The current content of the editor as HTML string */
  value: string;
  
  /** Callback function called when editor content changes */
  onChange: (content: string) => void;
  
  /** Placeholder text shown in the editor */
  placeholder?: string;
}

| Prop | Type | Default | Description | |------|------|---------|-------------| | value | string | required | The editor content as HTML. | | onChange | (content: string) => void | required | Called when editor content changes. | | placeholder | string | "Start typing..." | Placeholder text displayed inside the editor. |

Development

Build the package locally:

npm run build

Type-check TypeScript files:

npm run type-check

Publishing

The package is published to npm with GitHub Actions integration. When you push to the main branch, the package will automatically build and publish if the version in package.json has been updated.

For manual publishing:

npm publish --access public

If your npm account requires two-factor authentication, include an OTP:

npm publish --access public --otp=123456

Replace 123456 with your current npm authenticator code.

Browser Support

  • Chrome/Edge: Latest 2 versions
  • Firefox: Latest 2 versions
  • Safari: Latest 2 versions

The component uses modern JavaScript and React 18+ APIs.

License

MIT - See LICENSE file for details