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

@webdakz/daeditor

v0.3.0

Published

Modern WYSIWYG editor — zero-jQuery, TypeScript-native, built on Simditor architecture

Downloads

57

Readme

Daeditor

Modern WYSIWYG editor built with TypeScript. Based on Simditor architecture, rewritten from scratch without jQuery.

Features

  • 19 toolbar buttons — bold, italic, underline, strikethrough, headings (H1-H7), font size, text color, ordered/unordered lists, blockquote, code, alignment (left/center/right), link, image, table, horizontal rule, HTML source editor
  • Image handling — drag & drop upload, paste from clipboard, resize with drag handles, double-click to edit properties (URL, alt, size, float)
  • Markdown shortcuts# H1, ## H2, * list, > quote, ``` code, --- divider
  • Slash commands — type / to open block type menu with filtering
  • Keyboard shortcuts — Cmd+B/I/U, Cmd+Z undo, Shift+Cmd+Z redo
  • HTML sanitization — whitelist-based via DOMPurify
  • Undo/redo — 20-state stack with cursor position serialization
  • Accessibility — toolbar keyboard navigation, aria-live announcements
  • Localization — Russian, English, Chinese
  • Zero jQuery — vanilla DOM, single dependency (DOMPurify)

Install

npm install daeditor

Usage

<textarea id="editor"></textarea>

<script type="module">
  import { Editor } from 'daeditor';
  import 'daeditor/style.css';

  const editor = new Editor({
    textarea: '#editor',
    placeholder: 'Start typing...',
    locale: 'en-US',
  });
</script>

Options

const editor = new Editor({
  // Required
  textarea: '#editor',              // selector or HTMLTextAreaElement

  // Optional
  placeholder: 'Start typing...',   // placeholder text
  locale: 'en-US',                  // 'en-US' | 'ru-RU' | 'zh-CN'
  toolbar: true,                    // true | false | ['bold', 'italic', '|', ...]
  tabIndent: true,                  // Tab key indentation
  pasteImage: true,                 // allow image paste from clipboard
  cleanPaste: false,                // paste as plain text
  indentWidth: 40,                  // indent size in px

  // Image upload callback
  uploadImage: async (file: File): Promise<string> => {
    const formData = new FormData();
    formData.append('image', file);
    const res = await fetch('/api/upload', { method: 'POST', body: formData });
    const { url } = await res.json();
    return url;
  },
});

API

editor.setValue('<p>Hello <strong>world</strong></p>');
editor.getValue();     // returns HTML string
editor.sync();         // sync to textarea
editor.focus();
editor.blur();
editor.enable();
editor.disable();
editor.isEmpty();      // true if no content
editor.destroy();      // cleanup

// Events
editor.on('valuechanged', () => { /* content changed */ });
editor.on('selectionchanged', () => { /* cursor moved */ });
editor.on('focus', () => { /* editor focused */ });
editor.on('blur', () => { /* editor blurred */ });
editor.on('pasteimage', (file: File) => { /* image pasted */ });

Custom Toolbar

const editor = new Editor({
  textarea: '#editor',
  toolbar: [
    'bold', 'italic', 'underline', '|',
    'heading', 'ol', 'ul', '|',
    'link', 'image',
  ],
});

Available buttons: bold, italic, underline, strikethrough, heading, fontScale, color, ol, ul, blockquote, code, alignLeft, alignCenter, alignRight, link, image, table, hr, html

Custom Buttons

import { ToolbarButton, Toolbar, Editor } from 'daeditor';

class MyButton extends ToolbarButton {
  name = 'myButton';
  icon = 'myIcon';
  shortcut = 'cmd+m';

  command(): void {
    // your logic
    this.editor.trigger('valuechanged');
  }
}

Toolbar.registerButton('myButton', MyButton);

const editor = new Editor({
  textarea: '#editor',
  toolbar: ['bold', 'italic', '|', 'myButton'],
});

Custom Locale

import { I18n } from 'daeditor';

I18n.addLocale('de-DE', {
  bold: 'Fett',
  italic: 'Kursiv',
  underline: 'Unterstrichen',
  // ...
});

const editor = new Editor({
  textarea: '#editor',
  locale: 'de-DE',
});

Development

git clone https://github.com/webda-ai/daeditor.git
cd daeditor
npm install
npm run dev       # dev server at localhost:5173
npm run test      # run tests
npm run build     # build to dist/

Build Output

| Format | Size | Gzip | |--------|------|------| | ESM | ~86 KB | ~19 KB | | UMD | ~62 KB | ~16 KB | | CSS | ~8 KB | ~2 KB |

License

MIT