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

shadcn-tiptap-editor

v1.0.95

Published

A simple & ready to use tiptap editor using shadcn

Readme

shadcn-tiptap-editor

A simple & ready-to-use rich text editor built with Tiptap and shadcn/ui, featuring Markdown support, code blocks, comments, mentions, tables, and more. This project is designed for easy integration into React applications and provides a modern, extensible editing experience.

Example

You can interact with a live Storybook demo of the TiptapEditor component here:

Live Storybook: TiptapEditor

Features

  • Rich Text Editing: Powered by Tiptap and ProseMirror, supporting all standard formatting.
  • Markdown Mode: Toggle between rich text and markdown editing.
  • Code Blocks: Syntax highlighting for multiple languages using lowlight.
  • Comments: Inline comment support via the @sereneinserenade/tiptap-comment-extension.
  • Mentions: Customizable mention suggestions and rendering.
  • Tables: Advanced table editing with resizing and custom cell attributes.
  • Task Lists: Support for checklists and nested tasks.
  • Mathematics: Inline and block math rendering with KaTeX.
  • Slash Commands: Quick command menu for inserting elements.
  • Customizable Toolbar: Easily extend or modify the editor's toolbar and commands.
  • Read-Only Mode: Editor can be set to read-only mode with toolbar and bubble menu hidden.
  • Resizable Panels: Editor and comments panel can be resized for better UX.
  • Theming: Styled with Tailwind CSS and shadcn/ui components for a modern look.

Getting Started

Installation

npm install shadcn-tiptap-editor
# or
yarn add shadcn-tiptap-editor

Usage

import { TiptapEditor } from 'shadcn-tiptap-editor';

function MyEditor() {
  return (
    <TiptapEditor
      content="Hello, world!"
      onChange={markdown => console.log(markdown)}
      placeholder="Start typing..."
      codeLanguages={['js', 'ts', 'python']}
      commentOptions={{
        setActiveCommentId: (id) => { /* ... */ },
        createNewCommentAndReturnId: async () => { /* ... */ return 'id'; }
      }}
      mentionsQuery={query => [/* ...suggestions... */]}
    />
  );
}

Props

  • content (string): Initial content for the editor.
  • onChange (function): Callback when the editor content changes (returns Markdown).
  • placeholder (string): Placeholder text for the editor.
  • codeLanguages (string[]): Supported code languages for syntax highlighting.
  • commentOptions (object): Options for comment integration.
  • mentionsQuery (function): Function to provide mention suggestions.
  • editable (boolean): Whether the editor is editable (default: true). When false, toolbar and bubble menu are hidden.
  • className (string): Custom CSS classes for the editor content area.

Storybook Examples

The project includes comprehensive Storybook stories demonstrating various use cases:

  • Default: Basic editor with placeholder
  • WithContent: Editor with pre-populated content
  • WithMarkdown: Editor with markdown syntax examples
  • WithAllComponents: Comprehensive demo of all features
  • Mention: Editor with mention functionality
  • CommentsPanel: Editor with resizable comments panel
  • CommentsOutside: Editor with comments section below
  • ReadOnlyMode: Non-editable editor for display purposes
  • WithoutToolbar: Editor without toolbar but with bubble menu
  • CustomStyled: Editor with custom styling and container

Development

  • Storybook: Run npm run storybook to view and develop components in isolation.
  • Build: npm run build to build the library.
  • Lint: npm run lint to check code quality.

License

ISC

Author

Tomer Golomb