index.d.ts 887 B

1234567891011121314151617181920212223242526272829
  1. import { Plugin } from 'prosemirror-state';
  2. interface DropCursorOptions {
  3. /**
  4. The color of the cursor. Defaults to `black`. Use `false` to apply no color and rely only on class.
  5. */
  6. color?: string | false;
  7. /**
  8. The precise width of the cursor in pixels. Defaults to 1.
  9. */
  10. width?: number;
  11. /**
  12. A CSS class name to add to the cursor element.
  13. */
  14. class?: string;
  15. }
  16. /**
  17. Create a plugin that, when added to a ProseMirror instance,
  18. causes a decoration to show up at the drop position when something
  19. is dragged over the editor.
  20. Nodes may add a `disableDropCursor` property to their spec to
  21. control the showing of a drop cursor inside them. This may be a
  22. boolean or a function, which will be called with a view and a
  23. position, and should return a boolean.
  24. */
  25. declare function dropCursor(options?: DropCursorOptions): Plugin;
  26. export { dropCursor };