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

@derikomara/moon-editor

v1.2.2

Published

πŸŒ™ Moon Editor - A beautiful and powerful Rich Text Editor for React with Microsoft Office Power Paste support (with full image support)

Readme

πŸŒ™ Moon Editor

Where content creation meets elegance

A beautiful and powerful WYSIWYG editor for React with Microsoft Office Power Paste support.

npm version License: MIT Build Status

Demo Β· Documentation Β· Report Bug Β· Request Feature


✨ Highlights

πŸŒ™ Beautiful Design - Clean, modern interface that feels natural πŸš€ Power Paste - Copy from Word/Excel with full styling preservation
🎨 Rich Formatting - Everything you need for beautiful content πŸͺΆ Lightweight - Only ~10KB gzipped πŸ”’ Secure - Built-in XSS protection ⚑ Fast - Optimized for performance 🎯 TypeScript - Full type definitions included πŸ’Ž Zero Dependencies - Only requires React

πŸ“¦ Quick Install

npm install @deri/moon-editor

πŸš€ Quick Start

import { MoonEditor } from '@deri/moon-editor';
import '@deri/moon-editor/dist/style.css';

function App() {
  const [content, setContent] = useState('');
  
  return (
    <MoonEditor
      initialContent={content}
      onChange={setContent}
      placeholder="Start creating beautiful content..."
    />
  );
}

That's it! You now have a fully-featured rich text editor. πŸŽ‰

πŸ’« Features

Text Formatting

  • Styles: Bold, Italic, Underline, Strikethrough
  • Fonts: 8 beautiful font families
  • Sizes: 7 font sizes
  • Colors: Text and background color pickers with presets
  • Alignment: Left, Center, Right, Justify

Content Structure

  • Headings: H1 through H6
  • Lists: Ordered and unordered with nesting
  • Indentation: Precise control
  • Links: Easy hyperlink management

Media

  • Images: Drag & drop or upload
  • Videos: Embed videos easily
  • Auto-resize: Responsive media handling

Advanced Features

  • 🌟 Power Paste: Copy from Microsoft Office with style preservation
  • ⌨️ Shortcuts: Familiar keyboard shortcuts (Ctrl+B, I, U)
  • ↩️ History: Full undo/redo support
  • 🧹 Clean: Remove formatting with one click
  • πŸ‘οΈ Source: View and edit HTML directly

🌟 Power Paste Feature

The standout feature of Moon Editor is Power Paste - the ability to copy content from Microsoft Office applications and paste it with full styling preservation.

What Gets Preserved?

βœ… Text colors
βœ… Background colors
βœ… Font families
βœ… Font sizes
βœ… Bold, italic, underline
βœ… Headings (H1-H6)
βœ… Lists (ordered & unordered)
βœ… Tables
βœ… Links

What Gets Cleaned?

❌ MSO-specific properties
❌ Excessive spacing
❌ Office namespace tags
❌ Scripts & dangerous HTML

How to Use

  1. Format your content in Microsoft Word
  2. Copy (Ctrl+C)
  3. Paste in Moon Editor (Ctrl+V)
  4. ✨ Magic! All styling preserved!

πŸ“– Props API

| Prop | Type | Default | Description | |------|------|---------|-------------| | initialContent | string | "" | Initial HTML content | | onChange | (content: string) => void | - | Called when content changes | | placeholder | string | "Start typing here..." | Placeholder text | | className | string | "" | Additional CSS class | | minHeight | string | "500px" | Minimum editor height | | showToolbar | boolean | true | Show/hide toolbar | | toolbarConfig | ToolbarConfig | {} | Customize toolbar |

🎨 Customization

Custom Toolbar

<MoonEditor
  toolbarConfig={{
    showFontFamily: true,
    showColors: true,
    showMedia: false,    // Hide media upload
    showSourceView: false, // Hide HTML source
  }}
/>

Custom Styling

.moon-editor-container {
  border: 2px solid #6366f1;
  border-radius: 16px;
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.15);
}

πŸ“ Examples

Blog Editor

<MoonEditor
  initialContent={post.content}
  onChange={(content) => savePost({ ...post, content })}
  minHeight="600px"
/>

Comment System

<MoonEditor
  placeholder="Write your comment..."
  minHeight="150px"
  toolbarConfig={{
    showFontFamily: false,
    showMedia: false,
  }}
/>

Email Composer

<MoonEditor
  initialContent={draft}
  onChange={setDraft}
  placeholder="Compose your email..."
/>

πŸ”§ Development

# Clone repository
git clone https://github.com/deri/moon-editor.git

# Install dependencies
npm install

# Start dev server
npm run dev

# Build library
npm run build:lib

πŸ“š Documentation

🌐 Browser Support

  • Chrome/Edge (latest)
  • Firefox (latest)
  • Safari (latest)
  • Mobile browsers

🀝 Contributing

Contributions are welcome! Please read our Contributing Guide.

πŸ“„ License

MIT Β© Deri

πŸ™ Acknowledgments

Built with:

πŸ“§ Contact

Deri - GitHub

Project Link: https://github.com/deri/moon-editor


πŸŒ™ Made with love by Deri

If you find Moon Editor helpful, please consider giving it a ⭐ on GitHub!