@univerjs/docs-ui v0.4.2 • Docs
Class: Editor
Extends
Implements
IEditor
Constructors
new Editor()
new Editor(
_param,
_univerInstanceService,
_docSelectionManagerService,
_commandService,
_undoRedoService): Editor
Parameters
Parameter | Type |
---|---|
_param | IEditorOptions |
_univerInstanceService | IUniverInstanceService |
_docSelectionManagerService | DocSelectionManagerService |
_commandService | ICommandService |
_undoRedoService | IUndoRedoService |
Returns
Overrides
Defined in
packages/docs-ui/src/services/editor/editor.ts:182 (opens in a new tab)
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | Disposable ._disposed | packages/core/src/shared/lifecycle.ts:93 (opens in a new tab) |
blur$ | public | Observable <IEditorInputConfig > | undefined | - | packages/docs-ui/src/services/editor/editor.ts:170 (opens in a new tab) |
change$ | public | Observable <IEditorEvent > | undefined | - | packages/docs-ui/src/services/editor/editor.ts:153 (opens in a new tab) |
focus$ | public | Observable <IEditorInputConfig > | undefined | - | packages/docs-ui/src/services/editor/editor.ts:166 (opens in a new tab) |
input$ | public | Observable <IEditorInputEvent > | undefined | - | packages/docs-ui/src/services/editor/editor.ts:157 (opens in a new tab) |
paste$ | public | Observable <IEditorInputConfig > | undefined | - | packages/docs-ui/src/services/editor/editor.ts:161 (opens in a new tab) |
selectionChange$ | public | Observable <IDocSelectionInnerParam > | undefined | - | packages/docs-ui/src/services/editor/editor.ts:174 (opens in a new tab) |
Accessors
cancelDefaultResizeListener
get cancelDefaultResizeListener(): undefined | boolean
Returns
undefined
| boolean
Defined in
packages/docs-ui/src/services/editor/editor.ts:389 (opens in a new tab)
editorUnitId
get editorUnitId(): undefined | string
Deprecated
use getEditorId.
Returns
undefined
| string
Defined in
packages/docs-ui/src/services/editor/editor.ts:378 (opens in a new tab)
params
get params(): IEditorOptions
Deprecated
@TODO:
JOCS
remove this in the future.
Returns
IEditorOptions
Defined in
packages/docs-ui/src/services/editor/editor.ts:385 (opens in a new tab)
render
get render(): IRender
Returns
Defined in
packages/docs-ui/src/services/editor/editor.ts:393 (opens in a new tab)
Methods
blur()
blur(): void
Returns
void
Implementation of
IEditor.blur
Defined in
packages/docs-ui/src/services/editor/editor.ts:299 (opens in a new tab)
clearUndoRedoHistory()
clearUndoRedoHistory(): void
Returns
void
Implementation of
IEditor.clearUndoRedoHistory
Defined in
packages/docs-ui/src/services/editor/editor.ts:363 (opens in a new tab)
dispose()
dispose(): void
Returns
void
Overrides
Defined in
packages/docs-ui/src/services/editor/editor.ts:369 (opens in a new tab)
disposeWithMe()
disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
Defined in
packages/core/src/shared/lifecycle.ts:96 (opens in a new tab)
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
Defined in
packages/core/src/shared/lifecycle.ts:100 (opens in a new tab)
focus()
focus(): void
Returns
void
Implementation of
IEditor.focus
Defined in
packages/docs-ui/src/services/editor/editor.ts:271 (opens in a new tab)
getBody()
getBody(): undefined | IDocumentBody
Returns
undefined
| IDocumentBody
Deprecated
use getDocumentData.
Defined in
packages/docs-ui/src/services/editor/editor.ts:494 (opens in a new tab)
getBoundingClientRect()
getBoundingClientRect(): DOMRect
Returns
DOMRect
Defined in
packages/docs-ui/src/services/editor/editor.ts:464 (opens in a new tab)
getDocumentData()
getDocumentData(): IDocumentData
Returns
Implementation of
IEditor.getDocumentData
Defined in
packages/docs-ui/src/services/editor/editor.ts:345 (opens in a new tab)
getEditorId()
getEditorId(): string
Returns
string
Implementation of
IEditor.getEditorId
Defined in
packages/docs-ui/src/services/editor/editor.ts:340 (opens in a new tab)
getOpenForSheetSubUnitId()
getOpenForSheetSubUnitId(): Nullable<string>
Returns
Nullable
<string
>
Deprecated
Defined in
packages/docs-ui/src/services/editor/editor.ts:417 (opens in a new tab)
getOpenForSheetUnitId()
getOpenForSheetUnitId(): Nullable<string>
Returns
Nullable
<string
>
Deprecated
Defined in
packages/docs-ui/src/services/editor/editor.ts:407 (opens in a new tab)
getSelectionRanges()
getSelectionRanges(): ITextRangeWithStyle[]
Returns
Implementation of
IEditor.getSelectionRanges
Defined in
packages/docs-ui/src/services/editor/editor.ts:329 (opens in a new tab)
getValue()
getValue(): string
Returns
string
Deprecated
use getDocumentData.
Defined in
packages/docs-ui/src/services/editor/editor.ts:485 (opens in a new tab)
isFocus()
isFocus(): boolean
Returns
boolean
Implementation of
IEditor.isFocus
Defined in
packages/docs-ui/src/services/editor/editor.ts:431 (opens in a new tab)
isFormulaEditor()
isFormulaEditor(): boolean
Returns
boolean
Deprecated
Defined in
packages/docs-ui/src/services/editor/editor.ts:478 (opens in a new tab)
isReadOnly()
isReadOnly(): boolean
Returns
boolean
Defined in
packages/docs-ui/src/services/editor/editor.ts:445 (opens in a new tab)
isSheetEditor()
isSheetEditor(): boolean
Returns
boolean
Deprecated
Defined in
packages/docs-ui/src/services/editor/editor.ts:473 (opens in a new tab)
isSingle()
isSingle(): boolean
Returns
boolean
Deprecated
Defined in
packages/docs-ui/src/services/editor/editor.ts:441 (opens in a new tab)
isSingleChoice()
isSingleChoice(): boolean
Returns
boolean
Defined in
packages/docs-ui/src/services/editor/editor.ts:397 (opens in a new tab)
isValueLegality()
isValueLegality(): boolean
Returns
boolean
Deprecated
Defined in
packages/docs-ui/src/services/editor/editor.ts:422 (opens in a new tab)
isVisible()
isVisible(): undefined | boolean
Returns
undefined
| boolean
Defined in
packages/docs-ui/src/services/editor/editor.ts:468 (opens in a new tab)
onlyInputContent()
onlyInputContent(): boolean
Returns
boolean
Deprecated
Defined in
packages/docs-ui/src/services/editor/editor.ts:450 (opens in a new tab)
onlyInputFormula()
onlyInputFormula(): boolean
Returns
boolean
Deprecated
Defined in
packages/docs-ui/src/services/editor/editor.ts:455 (opens in a new tab)
onlyInputRange()
onlyInputRange(): boolean
Returns
boolean
Deprecated
Defined in
packages/docs-ui/src/services/editor/editor.ts:460 (opens in a new tab)
select()
select(): void
Returns
void
Implementation of
IEditor.select
Defined in
packages/docs-ui/src/services/editor/editor.ts:308 (opens in a new tab)
setDocumentData()
setDocumentData(data, textRanges): void
Parameters
Parameter | Type |
---|---|
data | IDocumentData |
textRanges | Nullable <ITextRangeWithStyle []> |
Returns
void
Implementation of
IEditor.setDocumentData
Defined in
packages/docs-ui/src/services/editor/editor.ts:352 (opens in a new tab)
setFocus()
setFocus(state): void
Parameters
Parameter | Type | Default value |
---|---|---|
state | boolean | false |
Returns
void
Deprecated
Defined in
packages/docs-ui/src/services/editor/editor.ts:436 (opens in a new tab)
setOpenForSheetSubUnitId()
setOpenForSheetSubUnitId(subUnitId): void
Parameters
Parameter | Type |
---|---|
subUnitId | Nullable <string > |
Returns
void
Deprecated
Defined in
packages/docs-ui/src/services/editor/editor.ts:412 (opens in a new tab)
setOpenForSheetUnitId()
setOpenForSheetUnitId(unitId): void
Parameters
Parameter | Type |
---|---|
unitId | Nullable <string > |
Returns
void
Deprecated
Defined in
packages/docs-ui/src/services/editor/editor.ts:402 (opens in a new tab)
setSelectionRanges()
setSelectionRanges(ranges): void
Parameters
Parameter | Type |
---|---|
ranges | ISuccinctDocRangeParam [] |
Returns
void
Implementation of
IEditor.setSelectionRanges
Defined in
packages/docs-ui/src/services/editor/editor.ts:318 (opens in a new tab)
setValueLegality()
setValueLegality(state): void
Parameters
Parameter | Type | Default value |
---|---|---|
state | boolean | true |
Returns
void
Deprecated
Defined in
packages/docs-ui/src/services/editor/editor.ts:427 (opens in a new tab)
update()
update(param): void
@deprecated.
Parameters
Parameter | Type |
---|---|
param | Partial <IEditorOptions > |
Returns
void
Defined in
packages/docs-ui/src/services/editor/editor.ts:502 (opens in a new tab)
updateCanvasStyle()
updateCanvasStyle(): void
@deprecated.
Returns
void
Defined in
packages/docs-ui/src/services/editor/editor.ts:548 (opens in a new tab)
verticalAlign()
verticalAlign(): void
@deprecated.
Returns
void
Defined in
packages/docs-ui/src/services/editor/editor.ts:512 (opens in a new tab)