Skip to content

Block Select

block-select lets authors select an entire block node with a drag handle or block-level gesture. It is useful for editors that need block reordering, block-level commands, or visual affordances around the current block selection.

Install

Terminal window
pnpm add @citolab/prose-extensions

Usage

import { blockSelectPlugin } from '@citolab/prose-extensions/block-select';
const plugins = [blockSelectPlugin];

ProseKit

If your app is built on ProseKit, use the extension wrapper instead. It requires the prosekit peer dependency:

import { blockSelectExtension } from '@citolab/prose-extensions/prosekit-extensions';

When to use

Use this when users need to select or drag whole blocks instead of editing inline text only.