Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 1x 1x 638x 197x 441x 11x 430x | import { hasSelectionInBlock } from './hasSelectionInBlock'; import type { ReadonlyContentModelBlockGroup } from 'roosterjs-content-model-types'; /** * Check if there is selection within the given block * @param block The block to check */ export function hasSelectionInBlockGroup(group: ReadonlyContentModelBlockGroup): boolean { if (group.blockGroupType == 'TableCell' && group.isSelected) { return true; } if (group.blocks.some(hasSelectionInBlock)) { return true; } return false; } |