Security News
JavaScript Leaders Demand Oracle Release the JavaScript Trademark
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
@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
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 5 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
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.