@remirror/extension-gap-cursor
v3.0.1
Published
Enable cursors for difficult to reach parts of the document.
Downloads
151,496
Readme
@remirror/extension-gap-cursor
Enable cursors for difficult to reach parts of the document.
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';