![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@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 700,653 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 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.