@univerjscorefunctionsGetcustomrangeslice

@univerjs/core v0.5.0-beta.1Docs


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

ParameterType
bodyIDocumentBody
startOffsetnumber
endOffsetnumber

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