API Reference
@univerjs
@univerjs/find-replace
classes
Findmodel

@univerjs/find-replace v0.4.2Docs


Class: abstract FindModel

Extends

Constructors

new FindModel()

new FindModel(): FindModel

Returns

FindModel

Inherited from

Disposable.constructor

Properties

PropertyModifierTypeDefault valueDescriptionInherited fromDefined in
_disposedprotectedbooleanfalse-Disposable._disposedpackages/core/src/shared/lifecycle.ts:93 (opens in a new tab)
activelyChangingMatch$abstractObservable<IFindMatch<unknown>>undefined--packages/find-replace/src/services/find-replace.service.ts:69 (opens in a new tab)
matchesUpdate$abstractObservable<IFindMatch<unknown>[]>undefinedFind model should emit new matches from this observable if they changed no matter due to incremental or document's content changes.-packages/find-replace/src/services/find-replace.service.ts:68 (opens in a new tab)
unitIdabstractstringundefined--packages/find-replace/src/services/find-replace.service.ts:62 (opens in a new tab)

Methods

dispose()

dispose(): void

Returns

void

Inherited from

Disposable.dispose

Defined in

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


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe

Defined in

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


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

Disposable.ensureNotDisposed

Defined in

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


getMatches()

abstract getMatches(): IFindMatch<unknown>[]

Returns

IFindMatch<unknown>[]

Defined in

packages/find-replace/src/services/find-replace.service.ts:71 (opens in a new tab)


moveToNextMatch()

abstract moveToNextMatch(params?): null | IFindMatch<unknown>

Parameters

ParameterType
params?IFindMoveParams

Returns

null | IFindMatch<unknown>

Defined in

packages/find-replace/src/services/find-replace.service.ts:73 (opens in a new tab)


moveToPreviousMatch()

abstract moveToPreviousMatch(params?): null | IFindMatch<unknown>

Parameters

ParameterType
params?IFindMoveParams

Returns

null | IFindMatch<unknown>

Defined in

packages/find-replace/src/services/find-replace.service.ts:74 (opens in a new tab)


replace()

abstract replace(replaceString): Promise<boolean>

Replace the currently focused matching if there is one.

Parameters

ParameterType
replaceStringstring

Returns

Promise<boolean>

Defined in

packages/find-replace/src/services/find-replace.service.ts:77 (opens in a new tab)


replaceAll()

abstract replaceAll(replaceString): Promise<IReplaceAllResult>

Replace all matches. This method would return how many

Parameters

ParameterType
replaceStringstring

Returns

Promise<IReplaceAllResult>

Defined in

packages/find-replace/src/services/find-replace.service.ts:82 (opens in a new tab)


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