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

prosemirror-placeholder-mark

v0.1.6

Published

Adds inline placeholder marks to ProseMirror

Downloads

217

Readme

ProseMirror placeholder module

This module add support to prosemirror for a placeholder by defining a schema mark, a command for setting the mark and a plugin to provide underlying behaviour.

Placeholder content is inline and can overlap with other inline content, but has several key behaviours when being edited:

  • A cursor that moves into a placeholder is moved to the start of the placeholder
  • A placeholder adjacent to the current cursor has an active class applied
  • Editing a placeholder results in it's removal

This module also contains a demo to preview behaviour, which can also be viewed at https://prowriting.github.io/prosemirror-placeholder-mark/

Maintained by ProWritingAid

ProWritingAid is the only platform that offers world-class grammar and style checking combined with more in-depth reports to help you strengthen your writing.

Come check us out at prowritingaid.com!

Commands

  • npm run demo: Livereloading demo server with behaviour logs, placeholder support added to an example prosemirror configuration, served from /demo_dist
  • npm run build: Compile the module for release
  • npm run test: Compile and test the module

Documentation

Installation

npm install prosemirror-placeholder-mark

then

import { CreateMark as CreatePlaceholderMark, ToggleMark as TogglePlaceholderMark, placeholder } from "prosemirror-placeholder-mark"
import "prosemirror-placeholder-mark/dist/placeholder.css

Exports

The module exports:

CreateMark(options ?: CreateMarkOptions) -> mark:<Mark>

The first thing you'll want to do is configure and create the placeholder mark, then add it to your schema.

Interface
CreateMarkOptions {
  className ?: string,
  activeClassName ?: string
}

ToggleMark(mark: Mark) -> Command:<function>

Returns a command that can be used to apply the placeholder mark. A small extension to the internal ToggleMark from prosemirror-commands.

Pass it to e.g. keymaps just like toggleMark

placeholder(mark: Mark) -> Plugin:<instance>

Returns the plugin code that has all the behaviour extensions to the prosemirror transaction/update cycle. Add it to the plugins section of your editor instance.