GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Tiptap Docs
  • UI Components
  • Website
  • Sign up
  • Tiptap Editor
  • Quick start
  • Authentication
  • Pro access
  • Tiptap trial
  • What's new in 3.0
  • All features
  • AIPaid
  • ReviewPaid
  • Smart CitationsPaid

This view

  • Original page
  • New address

GeezerVison is showing tiptap.dev — Dropcursor extension | Tiptap Editor Docs

This extension loads the ProseMirror Dropcursor plugin by Marijn Haverbeke, which shows a cursor at the drop position when something is dragged into the editor.

Note that Tiptap is headless, but the dropcursor needs CSS for its appearance. There are settings for the color and width, and you’re free to add a custom CSS class.

Install

npm install @tiptap/extensions

Usage

import { Editor } from '@tiptap/core'
import { Dropcursor } from '@tiptap/extensions'

new Editor({
  extensions: [Dropcursor],
})

Settings

color

Color of the dropcursor.

Default: 'currentColor'

Dropcursor.configure({
  color: '#ff0000',
})

width

Width of the dropcursor.

Default: 1

Dropcursor.configure({
  width: 2,
})

class

One or multiple CSS classes that should be applied to the dropcursor.

Dropcursor.configure({
  class: 'my-custom-class',
})

Source code

packages/extensions/src/drop-cursor/

Minimal Install

import { Editor } from '@tiptap/core'
import { Dropcursor } from '@tiptap/extensions/dropcursor'

new Editor({
  extensions: [Dropcursor],
})
PreviouslyCursor and selection
Next upFocus
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.