API Reference
@univerjs
@univerjs/core
functions
Getcustomrangeslice

@univerjs/core v0.4.2Docs


Function: getCustomRangeSlice()

function getCustomRangeSlice(
   body, 
   startOffset, 
   endOffset): {
  customRanges: {
     endIndex: number;
     properties: Record<string, any>;
     rangeId: string;
     rangeType: number;
     startIndex: number;
     wholeEntity: boolean;
    }[];
  leftOffset: number;
  rightOffset: number;
}

Parameters

ParameterType
bodyIDocumentBody
startOffsetnumber
endOffsetnumber

Returns

{
  customRanges: {
     endIndex: number;
     properties: Record<string, any>;
     rangeId: string;
     rangeType: number;
     startIndex: number;
     wholeEntity: boolean;
    }[];
  leftOffset: number;
  rightOffset: number;
}
NameTypeDefined in
customRanges{ endIndex: number; properties: Record<string, any>; rangeId: string; rangeType: number; startIndex: number; wholeEntity: boolean; }[]submodules/univer/packages/core/src/docs/data-model/text-x/utils.ts:262 (opens in a new tab)
leftOffsetnumbersubmodules/univer/packages/core/src/docs/data-model/text-x/utils.ts:267 (opens in a new tab)
rightOffsetnumbersubmodules/univer/packages/core/src/docs/data-model/text-x/utils.ts:268 (opens in a new tab)

Defined in

submodules/univer/packages/core/src/docs/data-model/text-x/utils.ts:226 (opens in a new tab)


Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.