@remirror/extension-gap-cursor

Enable cursors for difficult to reach parts of the document.

Usage no npm install needed!

<script type="module">
  import remirrorExtensionGapCursor from 'https://cdn.skypack.dev/@remirror/extension-gap-cursor';
</script>

README

@remirror/extension-gap-cursor

Enable cursors for difficult to reach parts of the document.

Version Weekly Downloads Bundled size Typed Codebase MIT License

Installation

# yarn
yarn add @remirror/extension-gap-cursor

# pnpm
pnpm add @remirror/extension-gap-cursor

# npm
npm install @remirror/extension-gap-cursor

This is included by default when you install the recommended remirror package. All exports are also available via the entry-point, remirror/extensions.

Usage

The following code creates an instance of this extension.

import { GapCursorExtension } from 'remirror/extensions';

const extension = new GapCursorExtension();

When enabled, this will capture clicks near and arrow-key-motion past places that don't have a normally selectable position nearby, and create a gap cursor selection for them. The cursor is drawn as an element with class ProseMirror-gapcursor.

Make sure to import the styles as shown below.

import 'remirror/styles/gap-cursor.css';