Class: Editor
Defined in: submodules/univer/packages/docs-ui/src/services/editor/editor.ts:109
Extends
Implements
IEditor
Constructors
new Editor()
new Editor(
_param,
_univerInstanceService,
_docSelectionManagerService,
_commandService,
_undoRedoService): Editor
Defined in: submodules/univer/packages/docs-ui/src/services/editor/editor.ts:134
Parameters
Parameter | Type |
---|---|
_param | IEditorOptions |
_univerInstanceService | IUniverInstanceService |
_docSelectionManagerService | DocSelectionManagerService |
_commandService | ICommandService |
_undoRedoService | IUndoRedoService |
Returns
Overrides
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | Disposable ._disposed | submodules/univer/packages/core/src/shared/lifecycle.ts:96 |
blur$ | public | Observable <IEditorInputConfig > | undefined | - | submodules/univer/packages/docs-ui/src/services/editor/editor.ts:128 |
change$ | public | Observable <IEditorEvent > | undefined | - | submodules/univer/packages/docs-ui/src/services/editor/editor.ts:112 |
focus$ | public | Observable <IEditorInputConfig > | undefined | - | submodules/univer/packages/docs-ui/src/services/editor/editor.ts:124 |
input$ | public | Observable <IEditorInputEvent > | undefined | - | submodules/univer/packages/docs-ui/src/services/editor/editor.ts:116 |
paste$ | public | Observable <IEditorInputConfig > | undefined | - | submodules/univer/packages/docs-ui/src/services/editor/editor.ts:120 |
selectionChange$ | public | Observable <IDocSelectionInnerParam > | undefined | - | submodules/univer/packages/docs-ui/src/services/editor/editor.ts:132 |
Accessors
cancelDefaultResizeListener
Get Signature
get cancelDefaultResizeListener(): undefined | boolean
Defined in: submodules/univer/packages/docs-ui/src/services/editor/editor.ts:388
Returns
undefined
| boolean
docSelectionRenderService
Get Signature
get docSelectionRenderService(): DocSelectionRenderService
Defined in: submodules/univer/packages/docs-ui/src/services/editor/editor.ts:146
Returns
editorDOM
Get Signature
get editorDOM(): HTMLDivElement
Defined in: submodules/univer/packages/docs-ui/src/services/editor/editor.ts:404
Returns
HTMLDivElement
editorUnitId
Get Signature
get editorUnitId(): undefined | string
Defined in: submodules/univer/packages/docs-ui/src/services/editor/editor.ts:377
Deprecated
use getEditorId.
Returns
undefined
| string
params
Get Signature
get params(): IEditorOptions
Defined in: submodules/univer/packages/docs-ui/src/services/editor/editor.ts:384
Deprecated
@TODO:
JOCS
remove this in the future.
Returns
IEditorOptions
render
Get Signature
get render(): IRender
Defined in: submodules/univer/packages/docs-ui/src/services/editor/editor.ts:392
Returns
Methods
blur()
blur(): void
Defined in: submodules/univer/packages/docs-ui/src/services/editor/editor.ts:262
Returns
void
Deprecated
use IEditorService.blur
as instead. this is for internal usage.
Implementation of
IEditor.blur
clearUndoRedoHistory()
clearUndoRedoHistory(): void
Defined in: submodules/univer/packages/docs-ui/src/services/editor/editor.ts:362
Returns
void
Implementation of
IEditor.clearUndoRedoHistory
dispose()
dispose(): void
Defined in: submodules/univer/packages/docs-ui/src/services/editor/editor.ts:368
Returns
void
Overrides
disposeWithMe()
disposeWithMe(disposable): IDisposable
Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:99
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
ensureNotDisposed()
protected ensureNotDisposed(): void
Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:103
Returns
void
Inherited from
focus()
focus(): void
Defined in: submodules/univer/packages/docs-ui/src/services/editor/editor.ts:233
Returns
void
Deprecated
use IEditorService.focus
as instead. this is for internal usage.
Implementation of
IEditor.focus
getBody()
getBody():
| undefined
| IDocumentBody
Defined in: submodules/univer/packages/docs-ui/src/services/editor/editor.ts:428
Returns
| undefined
| IDocumentBody
Deprecated
use getDocumentData.
getBoundingClientRect()
getBoundingClientRect(): DOMRect
Defined in: submodules/univer/packages/docs-ui/src/services/editor/editor.ts:400
Returns
DOMRect
getCursorPosition()
getCursorPosition(): number
Defined in: submodules/univer/packages/docs-ui/src/services/editor/editor.ts:301
Returns
number
getDocumentData()
getDocumentData(): IDocumentData
Defined in: submodules/univer/packages/docs-ui/src/services/editor/editor.ts:313
Returns
Implementation of
IEditor.getDocumentData
getDocumentDataModel()
getDocumentDataModel(): DocumentDataModel
Defined in: submodules/univer/packages/docs-ui/src/services/editor/editor.ts:319
Returns
getEditorId()
getEditorId(): string
Defined in: submodules/univer/packages/docs-ui/src/services/editor/editor.ts:308
Returns
string
Implementation of
IEditor.getEditorId
getSelectionRanges()
getSelectionRanges(): ITextRangeWithStyle[]
Defined in: submodules/univer/packages/docs-ui/src/services/editor/editor.ts:291
Returns
Implementation of
IEditor.getSelectionRanges
getValue()
getValue(): string
Defined in: submodules/univer/packages/docs-ui/src/services/editor/editor.ts:419
Returns
string
Deprecated
use getDocumentData.
isFocus()
isFocus(): boolean
Defined in: submodules/univer/packages/docs-ui/src/services/editor/editor.ts:225
Returns
boolean
Implementation of
IEditor.isFocus
isReadOnly()
isReadOnly(): boolean
Defined in: submodules/univer/packages/docs-ui/src/services/editor/editor.ts:396
Returns
boolean
isSheetEditor()
isSheetEditor(): boolean
Defined in: submodules/univer/packages/docs-ui/src/services/editor/editor.ts:412
Returns
boolean
isVisible()
isVisible(): undefined | boolean
Defined in: submodules/univer/packages/docs-ui/src/services/editor/editor.ts:408
Returns
undefined
| boolean
replaceText()
replaceText(text, resetCursor): void
Defined in: submodules/univer/packages/docs-ui/src/services/editor/editor.ts:334
Parameters
Parameter | Type | Default value |
---|---|---|
text | string | undefined |
resetCursor | boolean | true |
Returns
void
select()
select(): void
Defined in: submodules/univer/packages/docs-ui/src/services/editor/editor.ts:270
Returns
void
Implementation of
IEditor.select
setDocumentData()
setDocumentData(data, textRanges): void
Defined in: submodules/univer/packages/docs-ui/src/services/editor/editor.ts:324
Parameters
Parameter | Type |
---|---|
data | IDocumentData |
textRanges | Nullable <ITextRangeWithStyle []> |
Returns
void
Implementation of
IEditor.setDocumentData
setSelectionRanges()
setSelectionRanges(ranges): void
Defined in: submodules/univer/packages/docs-ui/src/services/editor/editor.ts:280
Parameters
Parameter | Type |
---|---|
ranges | ISuccinctDocRangeParam [] |
Returns
void
Implementation of
IEditor.setSelectionRanges
update()
update(param): void
Defined in: submodules/univer/packages/docs-ui/src/services/editor/editor.ts:436
@deprecated.
Parameters
Parameter | Type |
---|---|
param | Partial <IEditorOptions > |
Returns
void
updateCanvasStyle()
updateCanvasStyle(): void
Defined in: submodules/univer/packages/docs-ui/src/services/editor/editor.ts:446
@deprecated.
Returns
void