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

@emericklaw/summernote-cleaner

v1.0.5

Published

A plugin for the Summernote WYSIWYG editor.

Readme

summernote-cleaner v1.0.4

A plugin for the Summernote WYSIWYG editor.

summernote-cleaner removes the unnecessary and possibly layout breaking Crud that gets added by MSWord, Open Office, and Libre Office Documents.

The plugin can function in a couple of different ways. It can have a Toolbar Button which allows the Cleaning of the Editor's Text, or Pasted Text can be Cleaned when Pasted into the Text Editor.

The plugin can also limit the number of characters, with options to display text and/or HTML count in the status bar area.

Installation

1. Include JS

Include the following code after Summernote:

<script src="summernote-cleaner.js"></script>

2. Supported languages

Currently available in English!

3. Summernote options

$('.summernote').summernote({
    toolbar: [
        ['cleaner',['cleaner']], // The Button
        ['style',['style']],
        ['font',['bold','italic','underline','clear']],
        ['fontname',['fontname']],
        ['color',['color']],
        ['para',['ul','ol','paragraph']],
        ['height',['height']],
        ['table',['table']],
        ['insert',['media','link','hr']],
        ['view',['fullscreen','codeview']],
        ['help',['help']]
    ],
    cleaner: {
          action: 'both',
          icon: '<i class="note-icon">[Your Button]</i>',
          keepHtml: true,
          keepTagContents: ['span'], //Remove tags and keep the contents
          badTags: ['applet', 'col', 'colgroup', 'embed', 'noframes', 'noscript', 'script', 'style', 'title'], //Remove full tags with contents,
          badAttributes: ['bgcolor', 'border', 'height', 'cellpadding', 'cellspacing', 'lang', 'start', 'style', 'valign', 'width'],
          limitChars: false,
          limitDisplay: 'both',
          limitStop: false,
          notTimeOut: 850, //time before status message is hidden in miliseconds
          imagePlaceholder: 'https://via.placeholder.com/200' // URL, or relative path to file.
    }
});

Documentation

action: Options: ( both | button | paste )

  • button = Only cleans via toolbar button.
  • paste = Only cleans when pasting content.
  • both = Does both of the above options.

keepHtml:

  • true = Keeps HTML Markup and put through parser to remove Word Crud.
  • false = Removes tag elements using the text version of the pasted content from the clipboard.

badTags: Remove full tags with contents. Tags listed by name only ['style', 'script']`

badAttributes: Remove attributes from tags. Attributes listed by name only ['style', 'start']

limitChars: Limits the number of characters in the summernote

  • false or 0 = allows for max input
  • numbers > 0 = limit on number of characters

limitDisplay: Shows in the status area the total html & text characters Options: ( text | html | both )

  • text = text character count only
  • html = html character count only
  • both = both html & text

limitStop: Limits the number of characters set by limitChars.

  • true = stops input
  • false = doesn't stop input

imagePlaceholder: Replace pasted images with a nominated placeholder.

Thanks:

  • RichardSquires
    • Several issue regarding parsing text, and updating docs.
  • wheelspin
    • For adding Microsoft Browsers Support, and modifying the alert.
  • Diemen Design
    • Check out our other Summernote Plugins via our main Github page.

CHANGELOG:

v1.0.4

  • Resolved sucess status text always shown after action

v1.0.3

  • Added feature for removing a tag whilst keeping its content

v1.0.2

  • Resolved paste plain text with keepHtml enabled bug
  • Code cleanup

V1.0.1

  • Remove keepOnlyTags, and keepClasses, they were origially intended to be used, but refinement and other options have taken their place.
  • Reformat source looking for typos.
  • Replace Images with a nominated placeholder.
  • Replace alt attributes with data-title and alt used by Summernote.

TODO:

  • Implement Image conversion to base64, and hopefully automatic upload to destination folder.