---
title: "Gapcursor extension"
description: "Prevent your cursor from getting stuck with the Gapcursor extension in Tiptap. Learn more in our documentation."
canonical_url: "https://tiptap.dev/docs/editor/extensions/functionality/gapcursor"
---

# Gapcursor extension

Prevent your cursor from getting stuck with the Gapcursor extension in Tiptap. Learn more in our documentation.

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 don’t allow regular selection. For example, after a table at the end of a document.

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.

> **Interactive demo:** [Gapcursor](https://embed.tiptap.dev/preview/Extensions/Gapcursor)

## Install

```bash
npm install @tiptap/extensions
```

## Usage

```js
import { Editor } from '@tiptap/core'
import { Gapcursor } from '@tiptap/extensions'

new Editor({
  extensions: [Gapcursor],
})
```

## Source code

[packages/extensions/src/gap-cursor/](https://github.com/ueberdosis/tiptap/blob/main/packages/extensions/src/gap-cursor/)

## Minimal Install

```js
import { Editor } from '@tiptap/core'
import { Gapcursor } from '@tiptap/extensions/gapcursor'

new Editor({
  extensions: [Gapcursor],
})
```
