API Reference
@univerjs
@univerjs/docs
classes
Docselectionmanagerservice

@univerjs/docs v0.3.0Docs


Class: DocSelectionManagerService

This service is for text selection.

Extends

Constructors

new DocSelectionManagerService()

new DocSelectionManagerService(_commandService, _univerInstanceService): DocSelectionManagerService

Parameters

ParameterType
_commandServiceICommandService
_univerInstanceServiceIUniverInstanceService

Returns

DocSelectionManagerService

Overrides

RxDisposable.constructor

Defined in

docs/src/services/doc-selection-manager.service.ts:60 (opens in a new tab)

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseRxDisposable._disposedcore/src/shared/lifecycle.ts:93 (opens in a new tab)
dispose$protectedSubject<void>undefinedRxDisposable.dispose$core/src/shared/lifecycle.ts:117 (opens in a new tab)
refreshSelection$readonlyObservable<Nullable<IRefreshSelectionParam>>undefined-docs/src/services/doc-selection-manager.service.ts:58 (opens in a new tab)
textSelection$readonlyObservable<Nullable<ITextSelectionManagerInsertParam>>undefined-docs/src/services/doc-selection-manager.service.ts:55 (opens in a new tab)

Methods

__TEST_ONLY_add()

__TEST_ONLY_add(textRanges, isEditing): void

Parameters

ParameterTypeDefault value
textRangesITextRangeWithStyle[]undefined
isEditingbooleantrue

Returns

void

Defined in

docs/src/services/doc-selection-manager.service.ts:168 (opens in a new tab)


__TEST_ONLY_setCurrentSelection()

__TEST_ONLY_setCurrentSelection(param): void

Parameters

ParameterType
paramIDocSelectionManagerSearchParam

Returns

void

Defined in

docs/src/services/doc-selection-manager.service.ts:103 (opens in a new tab)


__getCurrentSelection()

__getCurrentSelection(): Nullable<IDocSelectionManagerSearchParam>

Returns

Nullable<IDocSelectionManagerSearchParam>

Defined in

docs/src/services/doc-selection-manager.service.ts:86 (opens in a new tab)


__replaceTextRangesWithNoRefresh()

__replaceTextRangesWithNoRefresh(textSelectionInfo): void

Parameters

ParameterType
textSelectionInfoIDocSelectionInnerParam

Returns

void

Defined in

docs/src/services/doc-selection-manager.service.ts:226 (opens in a new tab)


dispose()

dispose(): void

Returns

void

Overrides

RxDisposable.dispose

Defined in

docs/src/services/doc-selection-manager.service.ts:267 (opens in a new tab)


disposeWithMe()

protected disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

RxDisposable.disposeWithMe

Defined in

core/src/shared/lifecycle.ts:96 (opens in a new tab)


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

RxDisposable.ensureNotDisposed

Defined in

core/src/shared/lifecycle.ts:100 (opens in a new tab)


getActiveRectRange()

getActiveRectRange(): Nullable<ITextRangeWithStyle>

Returns

Nullable<ITextRangeWithStyle>

Deprecated

Defined in

docs/src/services/doc-selection-manager.service.ts:157 (opens in a new tab)


getActiveTextRange()

getActiveTextRange(): Nullable<ITextRangeWithStyle>

Returns

Nullable<ITextRangeWithStyle>

Defined in

docs/src/services/doc-selection-manager.service.ts:142 (opens in a new tab)


getDocRanges()

getDocRanges(params): ITextRangeWithStyle[]

Parameters

ParameterType
paramsNullable<IDocSelectionManagerSearchParam>

Returns

ITextRangeWithStyle[]

Defined in

docs/src/services/doc-selection-manager.service.ts:121 (opens in a new tab)


getRectRanges()

getRectRanges(params): Readonly<Nullable<IRectRangeWithStyle[]>>

Parameters

ParameterType
paramsNullable<IDocSelectionManagerSearchParam>

Returns

Readonly<Nullable<IRectRangeWithStyle[]>>

Defined in

docs/src/services/doc-selection-manager.service.ts:115 (opens in a new tab)


getSelectionInfo()

getSelectionInfo(params): undefined | IDocSelectionInnerParam

Parameters

ParameterType
paramsNullable<IDocSelectionManagerSearchParam>

Returns

undefined | IDocSelectionInnerParam

Defined in

docs/src/services/doc-selection-manager.service.ts:90 (opens in a new tab)


getTextRanges()

getTextRanges(params): Readonly<Nullable<ITextRangeWithStyle[]>>

Parameters

ParameterType
paramsNullable<IDocSelectionManagerSearchParam>

Returns

Readonly<Nullable<ITextRangeWithStyle[]>>

Defined in

docs/src/services/doc-selection-manager.service.ts:109 (opens in a new tab)


refreshSelection()

refreshSelection(params): void

Parameters

ParameterType
paramsNullable<IDocSelectionManagerSearchParam>

Returns

void

Defined in

docs/src/services/doc-selection-manager.service.ts:94 (opens in a new tab)


replaceDocRanges()

replaceDocRanges(
   docRanges, 
   params, 
   isEditing, 
   options?): void

Parameters

ParameterTypeDefault value
docRangesISuccinctDocRangeParam[]undefined
paramsNullable<IDocSelectionManagerSearchParam>...
isEditingbooleantrue
options?objectundefined

Returns

void

Defined in

docs/src/services/doc-selection-manager.service.ts:201 (opens in a new tab)


replaceTextRanges()

replaceTextRanges(
   docRanges, 
   isEditing, 
   options?): void

Parameters

ParameterTypeDefault value
docRangesISuccinctDocRangeParam[]undefined
isEditingbooleantrue
options?objectundefined

Returns

void

Deprecated

pls use replaceDocRanges.

Defined in

docs/src/services/doc-selection-manager.service.ts:188 (opens in a new tab)


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