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

notion-vibe-text-editor

v3.0.0

Published

Notion-like rich text editor for React with AI writing, voice typing, Cloudinary media, 150+ Google Fonts, and block-based editing — by Md Nurahmed

Readme

notion-vibe-text-editor

npm version License: MIT Downloads

A premium, Notion-style rich text editor for React — powered by BlockNote. Drop it into any React app and get AI writing, Cloudinary media uploads, 150+ Google Fonts, voice typing, and more — all out of the box.


✨ Features

| Feature | Description | |---------|-------------| | 📝 Block-Based Editing | Notion-style / slash menu with headings, lists, tables, code blocks, quotes, toggles, and more | | 🤖 AI Writing Assistant | Built-in AI text generation via any OpenAI-compatible API | | 🎙️ Voice Typing | Speak to type with 30+ language support — just type /voice | | ☁️ Cloudinary Media | Drag & drop images, videos, audio, and files — auto-uploaded to Cloudinary | | 🗑️ Auto Cleanup | Media deleted from the editor is automatically removed from Cloudinary (with 5s grace period for undo) | | 🔤 150+ Google Fonts | Categorized font picker: Sans, Serif, Display, Handwriting, Monospace, and Unique styles | | 🔠 Custom Font Sizes | Dropdown presets + type any exact pixel size + increment/decrement buttons | | 📰 Title & Slug | Beautiful title input with auto-generated URL slug (spaces → hyphens, lowercase, clean) | | 🎨 Rich Formatting | Bold, italic, underline, strikethrough, text color, text alignment, nested blocks, links | | 📖 Read-Only Mode | Set editable={false} to render content as a clean viewer |


📦 Installation

npm install notion-vibe-text-editor

🚀 Quick Start

import { useState } from "react";
import { Editor } from "notion-vibe-text-editor";
import { MantineProvider } from "@mantine/core";
import "@mantine/core/styles.css";

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

  return (
    <MantineProvider>
      <Editor
        initialContent={""}
        onChange={(json) => setContent(json)}
      />
    </MantineProvider>
  );
}

That's it — you now have a full-featured Notion-like editor! 🎉


🔧 Full Example (All Features)

import { useState } from "react";
import { Editor } from "notion-vibe-text-editor";
import { MantineProvider } from "@mantine/core";
import "@mantine/core/styles.css";

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

  return (
    <MantineProvider>
      <Editor
        // Core
        initialContent={""}
        onChange={(json) => setContent(json)}
        editable={true}

        // Title & Slug
        showSlug={true}
        onTitleChange={(title) => console.log("Title:", title)}
        onSlugChange={(slug) => console.log("Slug:", slug)}

        // Cloudinary Media Uploads
        cloudinaryConfig={{
          apiKey: "YOUR_CLOUDINARY_API_KEY",
          apiSecret: "YOUR_CLOUDINARY_API_SECRET",
          cloudName: "YOUR_CLOUD_NAME",
          folderName: "uploads",
        }}

        // AI Writing Assistant
        aiConfig={{
          apiKey: "YOUR_AI_API_KEY",
          modelName: "gpt-4o-mini",           // optional
          apiBaseUrl: "https://api.openai.com/v1", // optional
          proxyUrl: "https://your-proxy.com",      // optional, for CORS
        }}
      />
    </MantineProvider>
  );
}

📋 Props Reference

| Prop | Type | Default | Description | |------|------|---------|-------------| | onChange | (value: string) => void | Required | Called on every change. Returns stringified JSON of all blocks. | | initialContent | string | undefined | Initial editor content as stringified JSON. | | editable | boolean | true | Set to false for read-only viewer mode. | | showSlug | boolean | false | Shows a title + slug input above the editor. | | onTitleChange | (title: string) => void | undefined | Callback when the title changes. | | onSlugChange | (slug: string) => void | undefined | Callback when the slug changes. Slug auto-formats: lowercase, spaces → hyphens, no special chars. | | cloudinaryConfig | object | undefined | { apiKey, apiSecret, cloudName, folderName } — enables drag & drop media uploads. | | aiConfig | object | undefined | { apiKey, modelName?, apiBaseUrl?, proxyUrl? } — enables AI writing features. |


🎙️ Voice Typing

Type /voice in the editor to start voice typing. A red pulsing bar appears with:

  • Language selector — choose from 30+ languages including:
    • 🇺🇸 English, 🇧🇩 বাংলা, 🇮🇳 हिन्दी, 🇸🇦 العربية, 🇨🇳 中文, 🇯🇵 日本語, 🇰🇷 한국어, 🇪🇸 Español, 🇫🇷 Français, 🇩🇪 Deutsch, 🇷🇺 Русский, 🇵🇰 اردو, and many more
  • Stop button — end recording at any time
  • Switch language mid-recording — it restarts with the new language automatically

Uses the browser's native Web Speech API — no external API calls needed.


☁️ Cloudinary Integration

When cloudinaryConfig is provided:

  • Upload: Drag & drop or use /image, /video, /audio, /file commands
  • Auto-delete: When you remove a media block from the editor, the file is automatically deleted from Cloudinary after a 5-second grace period (so cut & paste doesn't lose your files)
  • Signed uploads: All uploads use signed Cloudinary API requests

🤖 AI Integration

When aiConfig is provided, type /AI in the slash menu to access the AI assistant. Compatible with:

  • OpenAI (gpt-4o, gpt-4o-mini, etc.)
  • Any OpenAI-compatible API (Groq, Together, LongCat, etc.)
  • Self-hosted models via custom apiBaseUrl

🎨 Typography

The editor includes 150+ Google Fonts automatically loaded and organized into categories:

  • Sans Serif — Inter, Roboto, Poppins, Montserrat, DM Sans, etc.
  • Serif — Playfair Display, Lora, Merriweather, EB Garamond, etc.
  • Display — Bebas Neue, Oswald, Anton, Orbitron, etc.
  • Handwriting — Pacifico, Dancing Script, Caveat, etc.
  • Monospace — JetBrains Mono, Fira Code, Source Code Pro, etc.
  • Unique — Major Mono Display, Zen Dots, Codystar, etc.

🤝 Contributing

We welcome contributions! Here's how you can help:

Add More Fonts

  1. Fork this repository
  2. Open src/components/Editor.tsx and find the fonts array in the useEffect
  3. Add your Google Font name to the appropriate category
  4. Test with npm run dev in the test-app directory
  5. Submit a Pull Request

The editor dynamically loads Google Fonts — just add the font name and it works!

Other Contributions

  • 🐛 Bug reports — Open an issue with reproduction steps
  • 💡 Feature requests — Suggest new features via issues
  • 📝 Documentation — Improve this README or add examples
  • 🔧 Code — Fix bugs or implement features from the issues list

📄 License

MIT © Md Nur Ahmad


Built with ❤️ - Md Nur Ahmad