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

@etoundi1er/hugerte-checklist-plugin

v1.0.1

Published

A plugin for HugeRTE to add checklist functionality

Downloads

146

Readme

HugeRTE/TinyMCE Checklist Plugin (Forever Free)

A lightweight checklist plugin for HugeRTE/TinyMCE that adds interactive checkbox functionality.

See Demo

Installation

npm install @etoundi1er/hugerte-checklist-plugin

Usage

import { onChecklistStateChange, getChecklistItems } from '@etoundi1er/hugerte-checklist-plugin';

hugerte.init({
    selector: '#editor',
    plugins: 'lists checklist',
    toolbar: 'checklist bullist numlist',
    setup: (editor) => {
        // Listen to checklist state changes (scoped to this editor)
        onChecklistStateChange(editor, (event) => {
            console.log('Editor:', event.editor.id);
            console.log('Item toggled:', event.text, event.checked);
        });
    }
});

Keyboard Shortcuts

  • Enter - Create new checklist item
  • Ctrl+Enter / Cmd+Enter - Toggle checkbox
  • Backspace on empty item - Exit checklist

API

onChecklistStateChange(editor, callback)

Register a callback for checkbox state changes, scoped to a specific editor instance. This ensures that when you have multiple editors on a page, callbacks are only triggered for the editor they were registered with.

Parameters:

  • editor - The HugeRTE/TinyMCE editor instance
  • callback - Function called when a checkbox state changes

Event object properties:

  • editor - The editor instance where the change occurred
  • element - The checkbox <li> element
  • text - The text content of the checkbox item
  • checked - Boolean indicating if the item is checked
// Inside setup (most common pattern)
import { onChecklistStateChange } from '@etoundi1er/hugerte-checklist-plugin'

hugerte.init({
    selector: '#my-editor',
    plugins: 'lists checklist',
    toolbar: 'checklist bullist numlist',
    setup: (editor) => {
        const unsubscribe = onChecklistStateChange(editor, (event) => {
            console.log('Editor:', event.editor.id)
            console.log('Item:', event.text)
            console.log('Checked:', event.checked)
            console.log('Element:', event.element)
        })

        // Later, to stop listening (e.g., on editor remove):
        editor.on('remove', () => unsubscribe())
    }
})

// Save checklist state to a backend when items change
hugerte.init({
    selector: '#my-editor',
    plugins: 'lists checklist',
    setup: (editor) => {
        onChecklistStateChange(editor, (event) => {
            fetch('/api/checklist-items', {
                method: 'PATCH',
                headers: { 'Content-Type': 'application/json' },
                body: JSON.stringify({
                    id: event.element.id,
                    text: event.text,
                    completed: event.checked
                })
            })
        })
    }
})

// Update UI when checklist items change (scoped to editor)
hugerte.init({
    selector: '#my-editor',
    plugins: 'lists checklist',
    setup: (editor) => {
        onChecklistStateChange(editor, (event) => {
            const body = event.editor.getBody()
            const completedCount = body.querySelectorAll('[data-checked="true"]').length
            const totalCount = body.querySelectorAll('.tox-checklist-item').length
            document.getElementById('progress').textContent = `${completedCount}/${totalCount}`
        })
    }
})

getChecklistItems(element)

Get all checklist items with their state.

// Get all checklist items from the editor
import { getChecklistItems } from '@etoundi1er/hugerte-checklist-plugin'

const editor = tinymce.get('my-editor')
const items = getChecklistItems(editor.getBody())

console.log(items)
// Output:
// [
//   { element: <li>, text: 'Buy groceries', checked: true },
//   { element: <li>, text: 'Cook dinner', checked: false },
//   { element: <li>, text: 'Clean up', checked: false }
// ]

// Filter only completed items
const editor = tinymce.get('my-editor')
const allItems = getChecklistItems(editor.getBody())
const completedItems = allItems.filter(item => item.checked)

console.log(`${completedItems.length} items completed`)

// Export checklist data
const editor = tinymce.get('my-editor')
const items = getChecklistItems(editor.getBody())

const checklistData = items.map(item => ({
    text: item.text,
    completed: item.checked
}))

// Save to backend
fetch('/api/checklists/save', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify(checklistData)
})

// Get statistics about the checklist
const editor = tinymce.get('my-editor')
const items = getChecklistItems(editor.getBody())

const total = items.length
const completed = items.filter(item => item.checked).length
const pending = total - completed
const percentage = Math.round((completed / total) * 100)

console.log(`Progress: ${percentage}% (${completed}/${total})`)

Local server

python3 -m http.server 8000

License

MIT