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

@editkit/svelte

v2.0.4

Published

Svelte 3/4/5 & SvelteKit rich text (WYSIWYG) editor action and bindings for EditKit with stable selection handling — tables, slash commands, bubble menu, and light/dark themes.

Readme

Svelte Text Editor — EditKit Rich Text Editor for Svelte & SvelteKit (@editkit/svelte)

@editkit/svelte is the official Svelte and SvelteKit integration for EditKit Text Editor, with native tables, a color picker, and configurable toolbars.


⚡ Why @editkit/svelte?

  • 🚀 No Third-Party Editor Engine: Built in TypeScript without ProseMirror, Lexical, Slate, or Quill.
  • 🟠 Universal Svelte Support: Works seamlessly across Svelte 3, Svelte 4, Svelte 5 (Runes), and SvelteKit.
  • 📊 First-Class Interactive Tables: 6×6 visual hover grid, row/column management, and cell coloring.
  • 🎨 2D HSV Custom Color Picker: 21 palette swatches + 2D spectrum canvas and hue slider.
  • 🫧 Contextual Floating Menus: Smart text selection bubble toolbar, floating table actions, and image resize bar.
  • 🎛️ Granular Feature Props: Turn any toolbar button on or off with boolean options.

📦 Installation

# Using npm
npm install @editkit/svelte @editkit/ui

# Using pnpm
pnpm add @editkit/svelte @editkit/ui

# Using yarn
yarn add @editkit/svelte @editkit/ui

All-in-one alternative: npm install editkit-text-editor svelte, then import from editkit-text-editor/svelte and editkit-text-editor/styles.


🚀 Quick Start (use:editkit)

<script lang="ts">
  import { editkit } from '@editkit/svelte';
  import '@editkit/ui/styles';

  let content = '<p>Hello from Svelte!</p>';
</script>

<div
  use:editkit={{
    content,
    theme: 'dark',
    placeholder: 'Write with EditKit in Svelte...',
    features: {
      chart: false,
      math: false,
    },
    onChange: (html) => {
      content = html;
    }
  }}
/>

🎛️ Complete Options Reference

| Option | Type | Default | Description | | :--- | :--- | :--- | :--- | | content | string | '' | Initial / reactive HTML content | | theme | 'light' \| 'dark' \| 'system' | 'dark' | Theme appearance | | placeholder | string | 'Write something...' | Empty editor placeholder text | | editable | boolean | true | Read-only mode toggle | | showToolbar | boolean | true | Show or hide the top formatting toolbar | | bubbleMenu | boolean | true | Enable floating selection bubble toolbar | | tableMenu | boolean | true | Enable contextual table action floating menu | | imageMenu | boolean | true | Enable floating image resizer menu | | features | ToolbarFeaturesConfig | {} | Granular toolbar button toggles | | onChange | (html: string) => void | - | Callback on content change |

Content is sanitized by default with EditKit's DOMPurify-based policy. Use the sanitize action option to adjust allowlists, pass your own sanitizer function, or false for trusted HTML. Sanitize again on your server before storing or rendering saved HTML. See Content safety.


❓ FAQ

How do I use this Svelte text editor in SvelteKit?

Apply use:editkit to an element. Actions run only in the browser, so the editor is created after hydration without extra SSR configuration.

Which Svelte versions are supported?

Svelte 3, 4 and 5.

How do I read the editor content?

Pass onChange: (html) => ... in the action options, or call getEditor().getHTML() on the action's return value.

Does it clean up when the element is removed?

Yes. Svelte calls the action's destroy(), which removes the editor and all of its UI.

📄 License

MIT © Ashikur Rahman