tiptap/docs/api/extensions/gapcursor.md

28 lines
1.2 KiB
Markdown
Raw Normal View History

---
description: The gapcursor makes sure the cursor doesnt get stuck … in a gap.
2021-10-15 03:20:21 +08:00
icon: space
---
# Gapcursor
2021-01-25 17:35:52 +08:00
[![Version](https://img.shields.io/npm/v/@tiptap/extension-gapcursor.svg?label=version)](https://www.npmjs.com/package/@tiptap/extension-gapcursor)
[![Downloads](https://img.shields.io/npm/dm/@tiptap/extension-gapcursor.svg)](https://npmcharts.com/compare/@tiptap/extension-gapcursor?minimal=true)
2020-11-05 18:46:27 +08:00
This extension loads the [ProseMirror Gapcursor plugin](https://github.com/ProseMirror/prosemirror-gapcursor) by Marijn Haverbeke, which adds a gap for the cursor in places that dont allow regular selection. For example, after a table at the end of a document.
2021-10-20 04:30:45 +08:00
Note that Tiptap is headless, but the gapcursor needs CSS for its appearance. The [default CSS](https://github.com/ueberdosis/tiptap/tree/main/packages/core/src/style.ts) is loaded through the Editor class.
## Installation
```bash
# with npm
npm install @tiptap/extension-gapcursor
# with Yarn
yarn add @tiptap/extension-gapcursor
```
## Source code
2021-04-21 21:31:11 +08:00
[packages/extension-gapcursor/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-gapcursor/)
## Usage
2021-10-19 00:01:47 +08:00
https://embed.tiptap.dev/preview/Extensions/Gapcursor