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

@viveeditor/ext-format

v1.1.0

Published

Text alignment, text colour and highlight extensions for viveEditor.

Readme

@viveeditor/ext-format

Text alignment, indent, colour, highlight, font size, superscript and subscript, letter case, smart typography and clear formatting extensions for viveEditor.

Part of viveEditor, a free, open-source rich text editor.

Install

npm install @viveeditor/ext-format @viveeditor/core

Usage

import { Editor } from '@viveeditor/core'
import '@viveeditor/core/style.css'
import { formatExtensions } from '@viveeditor/ext-format'

const editor = await Editor.create(document.querySelector('#editor'), {
  extensions: [...formatExtensions],
})

Alignment uses Ctrl/⌘+Shift+L, E, R and J. Ctrl/⌘+\ (editor.commands.clearFormatting()) removes every mark except links from the selection and resets alignment; ClearFormatting.configure({ keepMarks }) chooses which marks stay. FormatPainter adds copyFormat(), applyFormat(), cancelFormat() and the isPaintingFormat query: the copied marks are applied to the next mouse selection, or to a Shift-arrow selection when Shift is released; Escape cancels. CleanDocument adds cleanDocument() and the documentCleanup query: it removes spaces at paragraph edges, repeated spaces, line breaks at paragraph ends and extra empty paragraphs, never touching code blocks, and reports the counts. PasteOptions remembers the last formatted paste and adds pasteAs('keep' | 'clean' | 'plain'), dismissPaste() and the lastPaste query; switching restores the document from before the paste and runs the clipboard through the normal paste pipeline again. Indent moves paragraphs and headings in 2 em steps (indent(), outdent(), Ctrl/⌘+] and [, up to max: 8); the server sanitizer keeps the indent only on paragraphs and headings, so other types lose it there. FontSize sets a size in points (setFontSize(13.5) rounds to the nearest half point, 6–96 pt, written as font-size: 13.5pt) or one of the older FONT_SIZES steps ('tiny' | 'small' | 'big' | 'huge'); unsetFontSize() removes it and stepFontSize(1 | -1) (Ctrl/⌘+Shift+. and ,) moves to the next of FONT_POINT_PRESETS. The fontSize query returns the step or the point string, fontSizePoints the size as a number, and parseFontPoints('06.0PT') gives the canonical '6pt' or null. Subscript and Superscript toggle with Ctrl/⌘+, and . and exclude each other. ChangeCase adds changeCase('upper' | 'lower' | 'title' | 'sentence') and cycleCase() (Shift+F3) using the language of the text, so Turkish i becomes İ; with only a cursor it changes the word under it. Typography turns quotes, --, ..., (c), (r), (tm), -> and <- into typographic characters as you type; Backspace takes a replacement back, and quotes: null, dashes: false or symbols: false turn parts off. Colours are checked on paste and on output, so a style attribute never carries anything but a colour.

License

MIT