Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@tiptap/extension-gapcursor
Advanced tools
@tiptap/extension-gapcursor is an extension for the Tiptap editor that provides a visual cursor for empty spaces (gaps) in the document. This is particularly useful for navigating and editing documents with complex structures, such as nested nodes or inline nodes, where traditional cursors might not be sufficient.
Gap Cursor Initialization
This code demonstrates how to initialize the Tiptap editor with the GapCursor extension. By including the GapCursor extension, the editor will be able to display and handle gap cursors in the document.
import { GapCursor } from '@tiptap/extension-gapcursor';
import { Editor } from '@tiptap/core';
const editor = new Editor({
extensions: [
GapCursor,
],
});
Custom Styling for Gap Cursor
This code shows how to configure the GapCursor extension with custom styling. By providing a className, you can apply custom CSS to style the gap cursor as needed.
import { GapCursor } from '@tiptap/extension-gapcursor';
import { Editor } from '@tiptap/core';
import './styles.css';
const editor = new Editor({
extensions: [
GapCursor.configure({
className: 'custom-gapcursor',
}),
],
});
prosemirror-gapcursor is a similar package for the ProseMirror editor. It provides a gap cursor for navigating and editing empty spaces in the document. While @tiptap/extension-gapcursor is specifically designed for the Tiptap editor, prosemirror-gapcursor serves the same purpose for ProseMirror, which is the underlying editor framework that Tiptap is built upon.
slate-react is a package for the Slate editor that provides a React interface for building rich text editors. While it does not have a direct equivalent to the gap cursor, it offers similar functionality through its flexible schema and custom rendering capabilities, allowing developers to create custom cursors and navigation behaviors.
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
gapcursor extension for tiptap
The npm package @tiptap/extension-gapcursor receives a total of 779,284 weekly downloads. As such, @tiptap/extension-gapcursor popularity was classified as popular.
We found that @tiptap/extension-gapcursor 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.