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

@omkar-kamat/quill-keditor

v1.0.9

Published

Lightweight React Quill editor with KaTeX support

Readme


@omkar-kamat/quill-keditor

A powerful, React-based rich text editor built on top of Quill 2.0. It features advanced capabilities like built-in KaTeX math rendering, Smart Table management, Custom File/Image Upload, and now Customizable Toolbar support.

🚀 Features

  • Quill 2.0 Core: Stable, modern rich text editing.
  • Math Support: Native KaTeX integration for complex formulas.
  • Advanced Tables: Easily create and manage data tables.
  • Smart Uploads: Direct-to-server image and file upload support.
  • Custom Toolbar: Fully configurable toolbar to suit your app’s needs.
  • Sync Preview: Dedicated Preview component for high-fidelity content rendering.

📦 Installation

Install the required peer dependencies first:

npm install quill@^2.0.0 katex@^0.16.28

Then, install the package:

npm install @omkar-kamat/quill-keditor

🛠️ Usage

Basic Example

import React, { useState } from 'react';
import { KQuillEditor, Preview } from '@omkar-kamat/quill-keditor';
import '@omkar-kamat/quill-keditor/dist/quill-keditor.css';

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

  return (
    <div>
      <KQuillEditor value={content} onChange={setContent} />
      <Preview value={content} />
    </div>
  );
}

Advanced: Image & File Uploads

By default, Quill encodes images as Base64 strings. To keep your database light, use the imageUploadAPI and fileUploadAPI props to upload files to your server instead.

const uploadConfig = {
  uploadUrl: "https://your-api.com/upload",
  uploadName: "file", // The key your backend expects (e.g., req.file)
  headers: {
    Authorization: "Bearer your_token_here"
  }
};

<KQuillEditor 
  value={content} 
  onChange={setContent}
  imageUploadAPI={uploadConfig}
  fileUploadAPI={uploadConfig}
  placeholder="Start typing or drop an image..."
/>

Advanced: Custom Toolbar

You can now fully customize the toolbar with the toolbarContainer prop. Pass an array of buttons or groups you want to display:

const customToolbar = [
  ["bold", "italic", "underline", "strike"],
  [{ list: "ordered" }],
  [{ script: "sub" }, { script: "super" }],
  [{ indent: "-1" }, { indent: "+1" }, { align: [] }],
  [{ header: [1, 2, 3, 4, 5, 6, false] }],
  ["image", "formula", "table", "attachment"],
  ["clean", "html"],
];

<KQuillEditor
  value={content}
  onChange={setContent}
  toolbarContainer={customToolbar}
/>

⚙️ Props Reference

KQuillEditor

| Prop | Type | Default | Description | | ------------------ | ---------- | ---------------------- | -------------------------------------------- | | value | string | "" | The HTML string content. | | onChange | function | undefined | Callback returning the updated HTML string. | | placeholder | string | "Write something..." | Placeholder text. | | imageUploadAPI | object | null | Configuration for server-side image uploads. | | fileUploadAPI | object | null | Configuration for server-side file uploads. | | toolbarContainer | array | Default toolbar layout | Custom toolbar buttons/groups. |

Upload API Object Structure

{
  uploadUrl: string,  // Your backend endpoint
  uploadName: string, // The FormData key (e.g., "image")
  headers: object     // Optional: Auth tokens, etc.
}

Preview

| Prop | Type | Description | | ------- | -------- | -------------------------------------------------- | | value | string | The HTML content to render (sanitized and styled). |


📄 License

MIT © Omkar Kamat