@univerjs/docs-ui v0.5.0-beta.1 • Docs


Class: Editor

Extends

Implements

  • IEditor

Constructors

new Editor()

new Editor(
   _param, 
   _univerInstanceService, 
   _docSelectionManagerService, 
   _commandService, 
   _undoRedoService): Editor

Parameters

ParameterType
_paramIEditorOptions
_univerInstanceServiceIUniverInstanceService
_docSelectionManagerServiceDocSelectionManagerService
_commandServiceICommandService
_undoRedoServiceIUndoRedoService

Returns

Editor

Overrides

Disposable.constructor

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:182

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDisposable._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:93
blur$publicObservable<IEditorInputConfig>undefined-submodules/univer/packages/docs-ui/src/services/editor/editor.ts:170
change$publicObservable<IEditorEvent>undefined-submodules/univer/packages/docs-ui/src/services/editor/editor.ts:153
focus$publicObservable<IEditorInputConfig>undefined-submodules/univer/packages/docs-ui/src/services/editor/editor.ts:166
input$publicObservable<IEditorInputEvent>undefined-submodules/univer/packages/docs-ui/src/services/editor/editor.ts:157
paste$publicObservable<IEditorInputConfig>undefined-submodules/univer/packages/docs-ui/src/services/editor/editor.ts:161
selectionChange$publicObservable<IDocSelectionInnerParam>undefined-submodules/univer/packages/docs-ui/src/services/editor/editor.ts:174

Accessors

cancelDefaultResizeListener

Get Signature

get cancelDefaultResizeListener(): undefined | boolean
Returns

undefined | boolean

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:389


editorUnitId

Get Signature

get editorUnitId(): undefined | string
Deprecated

use getEditorId.

Returns

undefined | string

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:378


params

Get Signature

get params(): IEditorOptions
Deprecated

@TODO:

JOCS

remove this in the future.

Returns

IEditorOptions

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:385


render

Get Signature

get render(): IRender
Returns

IRender

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:393

Methods

blur()

blur(): void

Returns

void

Implementation of

IEditor.blur

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:299


clearUndoRedoHistory()

clearUndoRedoHistory(): void

Returns

void

Implementation of

IEditor.clearUndoRedoHistory

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:363


dispose()

dispose(): void

Returns

void

Overrides

Disposable.dispose

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:369


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:96


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

Disposable.ensureNotDisposed

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:100


focus()

focus(): void

Returns

void

Implementation of

IEditor.focus

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:271


getBody()

getBody(): undefined | IDocumentBody

Returns

undefined | IDocumentBody

Deprecated

use getDocumentData.

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:494


getBoundingClientRect()

getBoundingClientRect(): DOMRect

Returns

DOMRect

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:464


getDocumentData()

getDocumentData(): IDocumentData

Returns

IDocumentData

Implementation of

IEditor.getDocumentData

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:345


getEditorId()

getEditorId(): string

Returns

string

Implementation of

IEditor.getEditorId

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:340


getOpenForSheetSubUnitId()

getOpenForSheetSubUnitId(): Nullable<string>

Returns

Nullable<string>

Deprecated

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:417


getOpenForSheetUnitId()

getOpenForSheetUnitId(): Nullable<string>

Returns

Nullable<string>

Deprecated

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:407


getSelectionRanges()

getSelectionRanges(): ITextRangeWithStyle[]

Returns

ITextRangeWithStyle[]

Implementation of

IEditor.getSelectionRanges

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:329


getValue()

getValue(): string

Returns

string

Deprecated

use getDocumentData.

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:485


isFocus()

isFocus(): boolean

Returns

boolean

Implementation of

IEditor.isFocus

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:431


isFormulaEditor()

isFormulaEditor(): boolean

Returns

boolean

Deprecated

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:478


isReadOnly()

isReadOnly(): boolean

Returns

boolean

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:445


isSheetEditor()

isSheetEditor(): boolean

Returns

boolean

Deprecated

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:473


isSingle()

isSingle(): boolean

Returns

boolean

Deprecated

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:441


isSingleChoice()

isSingleChoice(): boolean

Returns

boolean

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:397


isValueLegality()

isValueLegality(): boolean

Returns

boolean

Deprecated

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:422


isVisible()

isVisible(): undefined | boolean

Returns

undefined | boolean

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:468


onlyInputContent()

onlyInputContent(): boolean

Returns

boolean

Deprecated

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:450


onlyInputFormula()

onlyInputFormula(): boolean

Returns

boolean

Deprecated

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:455


onlyInputRange()

onlyInputRange(): boolean

Returns

boolean

Deprecated

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:460


select()

select(): void

Returns

void

Implementation of

IEditor.select

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:308


setDocumentData()

setDocumentData(data, textRanges): void

Parameters

ParameterType
dataIDocumentData
textRangesNullable<ITextRangeWithStyle[]>

Returns

void

Implementation of

IEditor.setDocumentData

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:352


setFocus()

setFocus(state): void

Parameters

ParameterTypeDefault value
statebooleanfalse

Returns

void

Deprecated

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:436


setOpenForSheetSubUnitId()

setOpenForSheetSubUnitId(subUnitId): void

Parameters

ParameterType
subUnitIdNullable<string>

Returns

void

Deprecated

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:412


setOpenForSheetUnitId()

setOpenForSheetUnitId(unitId): void

Parameters

ParameterType
unitIdNullable<string>

Returns

void

Deprecated

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:402


setSelectionRanges()

setSelectionRanges(ranges): void

Parameters

ParameterType
rangesISuccinctDocRangeParam[]

Returns

void

Implementation of

IEditor.setSelectionRanges

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:318


setValueLegality()

setValueLegality(state): void

Parameters

ParameterTypeDefault value
statebooleantrue

Returns

void

Deprecated

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:427


update()

update(param): void

@deprecated.

Parameters

ParameterType
paramPartial<IEditorOptions>

Returns

void

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:502


updateCanvasStyle()

updateCanvasStyle(): void

@deprecated.

Returns

void

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:548


verticalAlign()

verticalAlign(): void

@deprecated.

Returns

void

Defined in

submodules/univer/packages/docs-ui/src/services/editor/editor.ts:512