A drop cursor plugin for ProseMirror https://prosemirror.net
  • TypeScript 100%
Find a file
2026-04-01 21:01:31 +02:00
src Add required exclamation point to make types check 2024-12-04 15:40:26 +01:00
.gitignore Initial add 2016-12-07 16:11:38 +01:00
.npmignore Add .npmignore 2016-12-10 00:41:05 +01:00
.npmrc Add an .npmrc that turns off lock files 2021-10-15 09:25:55 +02:00
CHANGELOG.md Mark version 1.8.2 2025-04-22 14:42:17 +02:00
CONTRIBUTING.md Update links to github 2026-04-01 21:01:31 +02:00
LICENSE Update maintainer email 2023-01-24 08:24:19 +01:00
package.json Update links to github 2026-04-01 21:01:31 +02:00
README.md Update links to github 2026-04-01 21:01:31 +02:00

prosemirror-dropcursor

[ WEBSITE | ISSUES | FORUM | CHANGELOG ]

This is a non-core example module for ProseMirror. ProseMirror is a well-behaved rich semantic content editor based on contentEditable, with support for collaborative editing and custom document schemas.

This module implements a plugin that shows a drop cursor for ProseMirror.

The project page has more information, a number of examples and the documentation.

This code is released under an MIT license. There's a forum for general discussion and support requests, and the bug tracker is the place to report issues.

We aim to be an inclusive, welcoming community. To make that explicit, we have a code of conduct that applies to communication around the project.

Documentation

  • dropCursor(options?: interface = {}) → Plugin
    Create a plugin that, when added to a ProseMirror instance, causes a decoration to show up at the drop position when something is dragged over the editor.

    Nodes may add a disableDropCursor property to their spec to control the showing of a drop cursor inside them. This may be a boolean or a function, which will be called with a view, a position, and the DragEvent, and should return a boolean.

    • options

      • color?: string
        The color of the cursor. Defaults to black.

      • width?: number
        The precise width of the cursor in pixels. Defaults to 1.

      • class?: string
        A CSS class name to add to the cursor element.