Vizel API / core/src / createVizelMultiBlockSelectionExtension
Function: createVizelMultiBlockSelectionExtension()
ts
function createVizelMultiBlockSelectionExtension(_options?): Extension;Defined in: packages/core/src/extensions/multi-block-selection.ts:230
Create the multi-block range selection extension. The extension is part of the always-on core and carries no opt-in feature flag.
Behavior:
- Tracks
Selectiontransitions and exposes the resulting block range viavizelMultiBlockSelectionPluginKey.getState(state). - Decorates each block in the range with
data-vizel-block-selected="true"so framework styles can render a range highlight. - Hooks Tab / Shift+Tab / Backspace / Delete in
addKeyboardShortcutsto apply the operation to every block in the range when a multi-block range is active. Single-block selections fall through to Tiptap's defaults.
Note on Tiptap conflicts: when a multi-block range is active, the shortcuts above intercept the keypress before the default Tab / Shift+Tab / Backspace / Delete handlers run. Single-block selections see the default behavior unchanged, so list indentation and inline deletion semantics are preserved exactly as Tiptap ships them.
Parameters
| Parameter | Type |
|---|---|
_options | VizelMultiBlockSelectionOptions |
Returns
Extension