prosemirror-dropcursor
npm i prosemirror-dropcursor

prosemirror-dropcursor

A drop cursor plugin for ProseMirror

by ProseMirror

1.4.0 (see all)License:MITTypeScript:DefinitelyTyped
npm i prosemirror-dropcursor
Readme

prosemirror-dropcursor

[ WEBSITE | ISSUES | FORUM | GITTER | 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 Github 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 and a position, 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.

Downloads/wk

370K

GitHub Stars

21

LAST COMMIT

7mos ago

MAINTAINERS

1

CONTRIBUTORS

7

OPEN ISSUES

0

OPEN PRs

0
VersionTagPublished
1.4.0
latest
7mos ago
1.5.0-beta.1
beta
7d ago
No alternatives found
No tutorials found
Add a tutorial