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

@scriba-editor/plugin-paste-clean

v0.1.1

Published

Cleans HTML pasted from Word, Google Docs and web pages before the schema parser (Scriba editor).

Readme

@scriba-editor/plugin-paste-clean

Incolla pulito da Word, Google Docs e pagine web, come il plugin "Paste from Word / PowerPoint" di TinyMCE (paste/powerpaste): liste vere al posto di quelle finte di Word, niente involucri Office/Docs, niente font e nero predefiniti.

pnpm add @scriba-editor/plugin-paste-clean

Uso

import { pasteClean } from '@scriba-editor/plugin-paste-clean'

const plugins = [
  pasteClean(), // oppure pasteClean({ keepFonts: true, keepColors: false })
  // ...
]

Il plugin agisce sul DOM dell'HTML incollato prima del parser dello schema (transformPastedDOM della view).

Cosa pulisce

| Origine | Interventi | | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | Word | ricostruisce liste annidate vere dai paragrafi mso-list; rimuove tag con namespace (o:p, v:shape, ...) e i numeri/pallini finti; MsoTitle diventa h1, MsoSubtitle diventa h2 | | Google Docs | toglie l'involucro docs-internal-guid e gli <br> al livello principale | | Tutte | sotto-liste lasciate dentro <ul>/<ol> spostate nell'elemento precedente; paragrafi con soli spazi/&nbsp; svuotati | | Stili | via font-family e font-size; via il colore nero o quasi nero (windowtext, black, #000, ...) e gli sfondi trasparenti |

La provenienza è rilevata da detectSource(body) ('word' | 'google-docs' | 'other').

Esportazioni

| Nome | Cosa fa | | -------------------------------- | ---------------------------------------------------------------------------------- | | pasteClean(options?) | Plugin da aggiungere all'editor | | cleanPastedDOM(body, options?) | Pulisce un body sul posto e restituisce la provenienza (utile fuori dall'editor) | | detectSource(body) | Riconosce Word, Google Docs o altro | | PasteCleanOptions | keepFonts (predefinito false), keepColors (predefinito true) | | PasteSource | 'word' \| 'google-docs' \| 'other' |

Sicurezza

Questo plugin migliora la fedeltà, non la sicurezza. Gira su un documento inerte (nulla viene eseguito) e ciò che lascia passa comunque dal parser dello schema, che scarta tutto ciò che non conosce (script, handler on*, URL non ammessi, stili liberi). L'HTML incollato è input non fidato: chi salva HTML deve ripassarlo sempre da @scriba-editor/sanitize-server sul server. Vedi sicurezza e plugin.