@univerjs/core v0.5.0-beta.1 • Docs
Function: getCustomRangeSlice()
function getCustomRangeSlice(
body,
startOffset,
endOffset): {
customRanges: undefined;
leftOffset: undefined;
rightOffset: undefined;
} | {
customRanges: {
endIndex: number;
properties: Record<string, any>;
rangeId: string;
rangeType: number;
startIndex: number;
wholeEntity: boolean;
}[];
leftOffset: number;
rightOffset: number;
}
Parameters
Parameter | Type |
---|---|
body | IDocumentBody |
startOffset | number |
endOffset | number |
Returns
{
customRanges
: undefined
;
leftOffset
: undefined
;
rightOffset
: undefined
;
} | {
customRanges
: {
endIndex
: number
;
properties
: Record
<string
, any
>;
rangeId
: string
;
rangeType
: number
;
startIndex
: number
;
wholeEntity
: boolean
;
}[];
leftOffset
: number
;
rightOffset
: number
;
}
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/text-x/utils.ts:236