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

rich-text-enhanced-editor

v0.0.6

Published

A powerful, extensible iframe-based custom rich text editor built on Tiptap v3.

Readme

Rich Text Enhanced Editor

A modular, iframe-based rich text editor built using Tiptap v3, offering advanced editing features with enhanced UI, secure isolation, and extensive plugin support.


🚀 Features

✒️ Core Editing

  • Tiptap v3 Engine: Built on the latest powerful headless editor framework.
  • Iframe Isolation: Styles and scripts are completely isolated from the host application.
  • History Management: Robust Undo / Redo functionality.
  • Security: Full HTML sanitization via DOMPurify.

🎨 Text & Formatting

  • Typography:
    • Customizable Font Family and Font Size (12px - 28px).
    • Capitalization: Uppercase, Lowercase, Capitalize.
    • Heading Levels: H1 through H6 + Paragraph.
  • Styling:
    • Bold, Italic, Underline, Strikethrough.
    • Subscript & Superscript.
    • Text Color & Highlight Color with custom palette support.
    • Clear Formatting utility.

📋 Lists & Layout

  • Advanced Lists:
    • Bullet Lists: Disc, Circle, Square, Dash, Checkmark.
    • Ordered Lists: Decimal, Alpha (Lower/Upper), Roman (Lower/Upper), Greek.
    • Task Lists: Interactive checkboxes (Checklist).
  • Alignment: Left, Center, Right, Justify.
  • Text Direction: RTL / LTR support.
  • Structure:
    • Page Breaks for print-layout simulation.
    • Horizontal Lines.
    • Indentation.

🎬 Media & Objects

  • Images: Drag-and-drop upload with Resizing capabilities.
  • Media Embedding: Support for Audio and other media types.
  • Tables: Comprehensive table management (Add/Delete Rows, Cols, Tables).
  • Links: Hyperlinks and Anchor support.
  • Special Characters: Emoji and Symbol insertion.
  • Date & Time: Quick insertion of current date/time.

🛠 Powerful Tools

  • Format Painter: Copy formatting from one text section to another.
  • Search & Replace: Advanced find/replace within the editor.
  • Source Code Editor: Direct HTML editing via embedded Ace Editor with syntax highlighting.
  • Visual Aids:
    • Visual Blocks: View block-level element boundaries.
    • Visual Characters: View invisible characters (tabs, spaces, breaks).
  • Preview Mode: Toggle between edit and read-only preview.
  • Fullscreen: Distraction-free editing.

🔧 Installation

npm install rich-text-enhanced-editor

🧑‍💻 Usage

The editor is initialized via the initRichTextEditor function.

import { initRichTextEditor } from 'rich-text-enhanced-editor';

initRichTextEditor({
  selector: '#editor-container',
  editorConfig: {
    height: '400px',
    width: '100%',
    showToolbar: true,
    displayWordCount: true,
    footerMessage: 'My Custom Editor',
    resize: true,
    // Load custom CSS inside the iframe
    cssFiles: 'https://example.com/my-styles.css'
  }
}).then(editor => {
  console.log('Editor initialized!');
  
  // Set initial content
  editor.setContent('<p>Hello World</p>');
  
  // Listen to updates
  editor.onUpdate(() => {
    console.log('Content changed:', editor.getContent());
  });
});

⚙️ Configuration

| Option | Type | Default | Description | | :--- | :--- | :--- | :--- | | selector | String | Required | CSS selector for the container element. | | editorConfig.height | String | '250px' | Height of the editor area. | | editorConfig.width | String | '100%' | Width of the editor iframe. | | editorConfig.showToolbar | Boolean | true | Show or hide the toolbar. | | editorConfig.resize | Boolean | false | Enable vertical resizing handle. | | editorConfig.displayWordCount | Boolean | false | Show word count in footer. | | editorConfig.footerMessage | String | '' | Custom text for the footer. | | editorConfig.cssFiles | String | undefined | Comma-separated URLs for external CSS. |


📦 Dependencies


📄 License

This project is licensed under the MIT License.