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

@pinkpixel/marzipan

v1.2.2

Published

Pure TypeScript markdown editor library with overlay preview

Downloads

77

Readme

License Version Docs

✨ Highlights

  • Pure TypeScript core – ships typed ESM builds and declaration files.
  • First-party actions – formatting helpers live in src/actions and export with the library, so you can drop markdown-actions entirely.
  • Plugin library – production-ready plugins (tables, Mermaid, syntax highlighting, media helpers, and more) live in src/plugins and publish under @pinkpixel/marzipan/plugins/*.
  • Overlay preview – renders markdown directly over the textarea so alignment never drifts.
  • Themeable UI – includes Solar (light), Cave (dark), and full CSS variable customization for custom palettes.
  • Demo Bakeshop – a Vite + React playground that exercises every option and plugin.

🍰 What’s in the repo?

| Package | Description | | ----------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | @pinkpixel/marzipan | Core editor library located in src/ (bundled to dist/). Ships the actions toolkit and plugin exports by default. | | @pinkpixel/marzipan/plugins/* | Individual plugin entry points compiled from src/plugins. Import only the helpers you need. | | bakeshop-demo/ | React playground showcasing toolbar presets, actions, plugins, and theming workflows. |

🚀 Quick Start

1. Install

npm install @pinkpixel/marzipan

2. Create an editor

import { Marzipan } from "@pinkpixel/marzipan";

const [editor] = new Marzipan("#my-textarea", {
  toolbar: true,
  theme: "cave",
  smartLists: true,
});

3. Use the bundled actions

import { actions } from "@pinkpixel/marzipan";

// Toggle bold formatting using our zero-dependency action suite
const textarea = document.querySelector("textarea")!;
actions.toggleBold(textarea);

4. Opt into a plugin

import { tablePlugin } from "@pinkpixel/marzipan/plugins/tablePlugin";

new Marzipan("#editor", {
  plugins: [tablePlugin()],
});

5. Try the Bakeshop playground

cd bakeshop-demo
npm install
npm run dev

Visit http://localhost:5173 to explore every panel, plugin, and action in a live environment.

🧩 Bundled Plugins

The src/plugins directory publishes directly to consumers. Available helpers include:

  • tablePlugin, tableGridPlugin, tableGeneratorPlugin – interactive table authoring with column alignment and header color options.
  • tinyHighlightPlugin – lightweight syntax highlighting for fenced code blocks (ships tinyHighlightStyles).
  • imageManagerPlugin, imagePickerPlugin – opinionated media workflows.
  • mermaidPlugin, mermaidExternalPlugin – diagram rendering via ESM or CDN.

Import only what you need:

import { mermaidPlugin } from "@pinkpixel/marzipan/plugins/mermaidPlugin";

🎬 Bundled Actions

The src/actions module ships a zero-dependency markdown formatting toolkit. All actions accept an HTMLTextAreaElement:

| Action | Description | | ------------------------------------ | -------------------------------------- | | toggleBold | Toggle **bold** | | toggleItalic | Toggle _italic_ | | toggleCode | Toggle `code` | | toggleStrikethrough | Toggle ~~strikethrough~~ or ~text~ | | insertHorizontalRule | Insert --- divider | | insertLink | Insert [text](url) | | toggleBulletList | Toggle bullet list | | toggleNumberedList | Toggle numbered list | | toggleTaskList | Toggle task list (- [ ]) | | toggleQuote | Toggle > blockquote | | insertHeader(level) | Insert # through ###### | | toggleH1 / toggleH2 / toggleH3 | Toggle specific heading level | | applyCustomFormat | Apply a custom format rule |

📚 Documentation

All guides live in /docs:

  • docs/README.md – orientation & navigation.
  • docs/quick-start.md – install, instantiate, and wire up actions/plugins.
  • docs/api.md – class API, action helpers, TypeScript signatures.
  • docs/plugins.md – plugin catalogue, configuration, and bundling tips.
  • docs/types.d.ts – generated type definitions.

The new CHANGELOG tracks releases and major documentation updates.

🗺️ Project Overview

Read OVERVIEW.md for architecture, tooling, and roadmap context, including how src/actions and src/plugins integrate with the build.

🛠️ Scripts

Run these from the repository root:

| Script | Purpose | | ------------------- | --------------------------------- | | npm run dev | Library build in watch mode | | npm run build | Type check then bundle to dist/ | | npm run typecheck | Strict TypeScript validation | | npm run lint | ESLint flat config | | npm run prettier | Format source and docs |

The Bakeshop has its own scripts inside bakeshop-demo/ (dev, build, preview, lint, typecheck).

🚀 Deployment

Docs Site → marzipan.pinkpixel.dev

The docs are built with VitePress and deployed to Cloudflare Pages (project: marzipan-docs).

# 1. Build the VitePress site (outputs to docs-site/)
npm run docs:build

# 2. Deploy to Cloudflare Pages
wrangler pages deploy docs-site --project-name marzipan-docs

Bakeshop Demo → bakeshop.pinkpixel.dev

The interactive playground is a Vite + React app deployed to Cloudflare Pages (project: marzipan-bakeshop).

# 1. Build the main library first
npm run build

# 2. Build and deploy the demo
cd bakeshop-demo
npm run build
wrangler pages deploy dist --project-name marzipan-bakeshop

🤝 Contributing

Pull requests are welcome! See CONTRIBUTING.md for the development workflow, coding standards, and Node.js requirements (20+).

💬 Support & Feedback

🙏 Acknowledgements

  • Inspired by markdown-actions; Marzipan now bundles a fully typed successor.
  • Built with TypeScript, Vite, and React (for the demo app).

Made with ❤️ by Pink Pixel