Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
@tiptap/extension-dropcursor
Advanced tools
@tiptap/extension-dropcursor is an extension for the Tiptap editor that provides a visual indicator for where content will be dropped when dragging and dropping elements within the editor. This enhances the user experience by making it clear where the content will be inserted.
Basic Drop Cursor
This code initializes a Tiptap editor with the Dropcursor extension. The drop cursor is configured to be blue and 2 pixels wide.
import { Dropcursor } from '@tiptap/extension-dropcursor';
import { Editor } from '@tiptap/core';
const editor = new Editor({
extensions: [
Dropcursor.configure({
color: 'blue',
width: 2,
}),
],
});
Custom Drop Cursor
This code initializes a Tiptap editor with a custom drop cursor that is red and 4 pixels wide.
import { Dropcursor } from '@tiptap/extension-dropcursor';
import { Editor } from '@tiptap/core';
const editor = new Editor({
extensions: [
Dropcursor.configure({
color: 'red',
width: 4,
}),
],
});
prosemirror-dropcursor is a similar package for the ProseMirror editor. It provides a drop cursor to indicate where content will be dropped. Like @tiptap/extension-dropcursor, it enhances the user experience by making the drop location clear. However, it is designed specifically for ProseMirror and may require additional configuration to work with Tiptap.
Tiptap is a headless wrapper around ProseMirror – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as New York Times, The Guardian or Atlassian.
Documentation can be found on the Tiptap website.
Tiptap is open sourced software licensed under the MIT license.
FAQs
dropcursor extension for tiptap
The npm package @tiptap/extension-dropcursor receives a total of 805,483 weekly downloads. As such, @tiptap/extension-dropcursor popularity was classified as popular.
We found that @tiptap/extension-dropcursor demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.