mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-19 11:06:25 +08:00
205cd7a86d
Closes: BS-2946
11 lines
349 B
TypeScript
11 lines
349 B
TypeScript
import { BlockSelection } from '@blocksuite/std';
|
|
|
|
import type { GetSelectionCommand } from './types';
|
|
|
|
export const getBlockSelectionsCommand: GetSelectionCommand = (ctx, next) => {
|
|
const currentBlockSelections = ctx.std.selection.filter(BlockSelection);
|
|
if (currentBlockSelections.length === 0) return;
|
|
|
|
next({ currentBlockSelections });
|
|
};
|