@univerjs/docs v0.4.2 • Docs
Class: DocSelectionManagerService
This service is for text selection.
Extends
Constructors
new DocSelectionManagerService()
new DocSelectionManagerService(_commandService, _univerInstanceService): DocSelectionManagerService
Parameters
Parameter | Type |
---|---|
_commandService | ICommandService |
_univerInstanceService | IUniverInstanceService |
Returns
Overrides
Defined in
docs/src/services/doc-selection-manager.service.ts:60 (opens in a new tab)
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | RxDisposable ._disposed | core/src/shared/lifecycle.ts:93 (opens in a new tab) |
dispose$ | protected | Subject <void > | undefined | RxDisposable .dispose$ | core/src/shared/lifecycle.ts:117 (opens in a new tab) |
refreshSelection$ | readonly | Observable <Nullable <IRefreshSelectionParam >> | undefined | - | docs/src/services/doc-selection-manager.service.ts:58 (opens in a new tab) |
textSelection$ | readonly | Observable <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
Parameter | Type | Default value |
---|---|---|
textRanges | ITextRangeWithStyle [] | undefined |
isEditing | boolean | true |
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
Parameter | Type |
---|---|
param | IDocSelectionManagerSearchParam |
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
Parameter | Type |
---|---|
textSelectionInfo | IDocSelectionInnerParam |
Returns
void
Defined in
docs/src/services/doc-selection-manager.service.ts:225 (opens in a new tab)
dispose()
dispose(): void
Returns
void
Overrides
Defined in
docs/src/services/doc-selection-manager.service.ts:266 (opens in a new tab)
disposeWithMe()
disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
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
Deprecated
Defined in
docs/src/services/doc-selection-manager.service.ts:157 (opens in a new tab)
getActiveTextRange()
getActiveTextRange(): Nullable<ITextRangeWithStyle>
Returns
Defined in
docs/src/services/doc-selection-manager.service.ts:142 (opens in a new tab)
getDocRanges()
getDocRanges(params): ITextRangeWithStyle[]
Parameters
Parameter | Type |
---|---|
params | Nullable <IDocSelectionManagerSearchParam > |
Returns
Defined in
docs/src/services/doc-selection-manager.service.ts:121 (opens in a new tab)
getRectRanges()
getRectRanges(params): Readonly<Nullable<IRectRangeWithStyle[]>>
Parameters
Parameter | Type |
---|---|
params | Nullable <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
Parameter | Type |
---|---|
params | Nullable <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
Parameter | Type |
---|---|
params | Nullable <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
Parameter | Type |
---|---|
params | Nullable <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
Parameter | Type | Default value |
---|---|---|
docRanges | ISuccinctDocRangeParam [] | undefined |
params | Nullable <IDocSelectionManagerSearchParam > | ... |
isEditing | boolean | true |
options ? | object | undefined |
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
Parameter | Type | Default value |
---|---|---|
docRanges | ISuccinctDocRangeParam [] | undefined |
isEditing | boolean | true |
options ? | object | undefined |
Returns
void
Deprecated
pls use replaceDocRanges.
Defined in
docs/src/services/doc-selection-manager.service.ts:188 (opens in a new tab)