API Reference
@univerjs
@univerjs/core
classes
Textx

@univerjs/core v0.1.17Docs


Class: TextX

Constructors

new TextX()

new TextX(): TextX

Returns

TextX

Properties

PropertyModifierTypeDefault valueDefined in
idstaticstring'text-x'submodules/univer/packages/core/src/docs/data-model/text-x/text-x.ts:34 (opens in a new tab)
uristaticstring'https://github.com/dream-num/univer#text-x'submodules/univer/packages/core/src/docs/data-model/text-x/text-x.ts:36 (opens in a new tab)

Methods

delete()

delete(len, segmentId): this

Parameters

ParameterTypeDefault value
lennumberundefined
segmentIdstring''

Returns

this

Defined in

submodules/univer/packages/core/src/docs/data-model/text-x/text-x.ts:218 (opens in a new tab)


insert()

insert(
   len, 
   body, 
   segmentId): this

Parameters

ParameterTypeDefault value
lennumberundefined
bodyIDocumentBodyundefined
segmentIdstring''

Returns

this

Defined in

submodules/univer/packages/core/src/docs/data-model/text-x/text-x.ts:184 (opens in a new tab)


push()

push(...args): this

Parameters

ParameterType
...argsTextXAction[]

Returns

this

Defined in

submodules/univer/packages/core/src/docs/data-model/text-x/text-x.ts:236 (opens in a new tab)


retain()

retain(
   len, 
   segmentId, 
   body?, 
   coverType?): this

Parameters

ParameterTypeDefault value
lennumberundefined
segmentIdstring''
body?IDocumentBodyundefined
coverType?UpdateDocsAttributeTypeundefined

Returns

this

Defined in

submodules/univer/packages/core/src/docs/data-model/text-x/text-x.ts:198 (opens in a new tab)


serialize()

serialize(): TextXAction[]

Returns

TextXAction[]

Defined in

submodules/univer/packages/core/src/docs/data-model/text-x/text-x.ts:231 (opens in a new tab)


trimEndUselessRetainAction()

protected trimEndUselessRetainAction(): this

Returns

this

Defined in

submodules/univer/packages/core/src/docs/data-model/text-x/text-x.ts:301 (opens in a new tab)


apply()

static apply(doc, actions): IDocumentBody

Parameters

ParameterType
docIDocumentBody
actionsTextXAction[]

Returns

IDocumentBody

Defined in

submodules/univer/packages/core/src/docs/data-model/text-x/text-x.ts:38 (opens in a new tab)


compose()

static compose(thisActions, otherActions): TextXAction[]

Parameters

ParameterType
thisActionsTextXAction[]
otherActionsTextXAction[]

Returns

TextXAction[]

Defined in

submodules/univer/packages/core/src/docs/data-model/text-x/text-x.ts:42 (opens in a new tab)


invert()

static invert(actions): TextXAction[]

Parameters

ParameterType
actionsTextXAction[]

Returns

TextXAction[]

Defined in

submodules/univer/packages/core/src/docs/data-model/text-x/text-x.ts:104 (opens in a new tab)


isNoop()

static isNoop(actions): boolean

Parameters

ParameterType
actionsTextXAction[]

Returns

boolean

Defined in

submodules/univer/packages/core/src/docs/data-model/text-x/text-x.ts:100 (opens in a new tab)


makeInvertible()

static makeInvertible(actions, doc): TextXAction[]

Parameters

ParameterType
actionsTextXAction[]
docIDocumentBody

Returns

TextXAction[]

Defined in

submodules/univer/packages/core/src/docs/data-model/text-x/text-x.ts:151 (opens in a new tab)


transform()

static transform(
   _thisActions, 
   _otherActions, 
   _priority): TextXAction[]

Parameters

ParameterType
_thisActionsTextXAction[]
_otherActionsTextXAction[]
_priorityTPriority

Returns

TextXAction[]

Defined in

submodules/univer/packages/core/src/docs/data-model/text-x/text-x.ts:96 (opens in a new tab)


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