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

@codematic.io/open-cdp-editor

v1.3.2

Published

A customizable React rich text editor component built with TailwindCSS and Ant Design, designed for seamless integration into openCDP and modern React applications.

Downloads

43

Readme

@codematic.io/open-cdp-editor

A React rich text editor component designed for openCDP, featuring a robust, extensible toolbar and seamless integration with Ant Design. It includes a sanitization layer using DOMPurify to ensure content security and a flexible modal system, allowing you to fully customize image selection and insertion logic


Features

  • Rich Text Editing: Bold, italics, underline, lists, alignment, and more.
  • Image & Link Support: Easily add images and links.
  • Sanitization: Uses DOMPurify to prevent XSS attacks.
  • Customizable Toolbar: Add or remove toolbar buttons as needed.
  • TypeScript Support: Fully typed for safe integration.
  • Ant Design UI: Clean, modern interface.
  • Flexible Modal System: Use the provided modal for image selection, or pass your own content for maximum flexibility.

Installation

npm install @codematic.io/open-cdp-editor

Usage

import React, { useState } from 'react';
import TextEditor from '@codematic.io/open-cdp-editor';
import '@codematic.io/open-cdp-editor/dist/index.css';

function MyEditorComponent() {

  const handleEditorChange = (html: string) => {
    // handle updated HTML or full HTML here
    console.log(html);
  };


  return (
      <TextEditor
        bodyHTML={initialHTML}
        // fullHTML={initialHTML}
        className="!h-[300px]"
        imageChildren={<div>Custom Modal Content</div>}
        onChange={handleEditorChange} />
  );
}

export default MyEditorComponent;

Props

| Prop | Type | Description | |-------------|---------------------------------|-------------------------------------------------------------------------------------------------------------| | bodyHTML | string | The HTML content to display and edit inside the editor's body. Ignored if fullHTML is provided. | | fullHTML | string | The full HTML document to edit. If provided, the editor will extract and edit the <body> content, and onChange will return the updated full HTML document. | | onChange | (html: string) => void | Callback function that receives the updated HTML content. Returns full HTML if fullHTML is set, otherwise just the body HTML. | | imageChildren | React.ReactNode | Custom content to render inside the editor, such as a modal for image selection. Use this to provide your own image grid/modal and handle image selection and insertion logic. | | ... | ... | options. |


Note: The editor does not fetch images or handle image selection logic itself. You must provide your own modal and image grid as children, and handle image insertion in your own code. This makes the editor fully customizable and reusable for any content.


License

MIT


Contributing

Pull requests and issues are welcome! Please open an issue to discuss your idea.


Acknowledgements