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

@bernierllc/tiptap-editor

v1.6.1

Published

Rich text editor UI component built on Tiptap with Tamagui styling

Readme

@bernierllc/tiptap-editor

Rich text editor UI component built on Tiptap with Tamagui styling and real-time collaboration support.

Installation

npm install @bernierllc/tiptap-editor

Peer Dependencies

This package requires the following peer dependencies:

npm install react @tamagui/core @tiptap/react @tiptap/starter-kit

Usage

Basic Example

import { TiptapEditor } from '@bernierllc/tiptap-editor';

function App() {
  const handleSave = (content: string) => {
    console.log('Saved:', content);
  };

  return (
    <TiptapEditor
      initialContent="<p>Hello World</p>"
      onSave={handleSave}
    />
  );
}

With Auto-Save

import { TiptapEditor } from '@bernierllc/tiptap-editor';

function App() {
  const handleAutoSave = (content: string) => {
    // Automatically called after 5 seconds of inactivity
    console.log('Auto-saved:', content);
  };

  return (
    <TiptapEditor
      initialContent="<p>Start typing...</p>"
      onAutoSave={handleAutoSave}
      autoSaveInterval={5000}
    />
  );
}

With Collaboration

import { TiptapEditor } from '@bernierllc/tiptap-editor';

function CollaborativeEditor() {
  return (
    <TiptapEditor
      enableCollaboration={true}
      collaborationSessionId="session-123"
      initialContent="<p>Collaborative editing!</p>"
    />
  );
}

Dark Theme

import { TiptapEditor } from '@bernierllc/tiptap-editor';

function DarkEditor() {
  return (
    <TiptapEditor
      theme="dark"
      initialContent="<p>Dark mode editor</p>"
    />
  );
}

Custom Toolbar

import { TiptapEditor } from '@bernierllc/tiptap-editor';

function CustomToolbarEditor() {
  return (
    <TiptapEditor
      toolbar={{
        showBold: true,
        showItalic: true,
        showHeadings: false, // Hide heading buttons
        showLists: true,
        customButtons: [
          {
            label: 'Custom',
            onClick: () => console.log('Custom action'),
            active: false
          }
        ]
      }}
    />
  );
}

API

TiptapEditor Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | initialContent | string | '' | Initial HTML content for the editor | | onSave | (content: string) => void | - | Callback when save button clicked | | onAutoSave | (content: string) => void | - | Callback for auto-save (debounced) | | autoSaveInterval | number | 5000 | Auto-save debounce interval (ms) | | editable | boolean | true | Whether editor is editable | | enableCollaboration | boolean | false | Enable real-time collaboration | | collaborationSessionId | string | - | Collaboration session identifier | | toolbar | ToolbarConfig | - | Toolbar configuration | | theme | 'light' \| 'dark' | 'light' | Editor theme |

ToolbarConfig

| Property | Type | Default | Description | |----------|------|---------|-------------| | showBold | boolean | true | Show bold button | | showItalic | boolean | true | Show italic button | | showHeadings | boolean | true | Show heading buttons | | showLists | boolean | true | Show list buttons | | showLink | boolean | true | Show link button | | showImage | boolean | true | Show image button | | showTable | boolean | true | Show table button | | customButtons | ToolbarButton[] | [] | Custom toolbar buttons |

ToolbarButton

| Property | Type | Description | |----------|------|-------------| | icon | React.ReactNode | Button icon | | label | string | Button label | | onClick | () => void | Click handler | | active | boolean | Whether button is active |

Hooks

useAutoSave

Debounced auto-save hook for custom implementations:

import { useAutoSave } from '@bernierllc/tiptap-editor';

function MyComponent() {
  const handleAutoSave = useAutoSave(
    (content: string) => {
      // Save content
    },
    5000 // 5 second debounce
  );

  return <div>...</div>;
}

Features

  • Rich Text Formatting: Bold, italic, headings, lists, and more
  • Auto-Save: Configurable debounced auto-save functionality
  • Collaboration: Optional real-time collaborative editing
  • Theming: Light and dark theme support
  • Customizable Toolbar: Show/hide buttons and add custom actions
  • TypeScript: Full TypeScript support with type definitions

License

Copyright (c) 2025 Bernier LLC. See LICENSE file for details.