Skip to main content

Class: abstract Command<T>

Defined in: packages/core/sdk/src/editor/commands/Command.ts:16

Extended by

Type Parameters

T

T = any

Constructors

Constructor

protected new Command<T>(option): Command<T>

Defined in: packages/core/sdk/src/editor/commands/Command.ts:30

Parameters

option

ICommand

Returns

Command<T>

Properties

attributePath

attributePath: PropertyPath = []

Defined in: packages/core/sdk/src/editor/commands/Command.ts:23


editor

editor: Editor

Defined in: packages/core/sdk/src/editor/commands/Command.ts:22


id

id: number = 0

Defined in: packages/core/sdk/src/editor/commands/Command.ts:17


inMemory

inMemory: boolean = false

Defined in: packages/core/sdk/src/editor/commands/Command.ts:18


name

name: string = ''

Defined in: packages/core/sdk/src/editor/commands/Command.ts:21


object

object: T

Defined in: packages/core/sdk/src/editor/commands/Command.ts:26


source

source: string

Defined in: packages/core/sdk/src/editor/commands/Command.ts:28


type

type: string = ''

Defined in: packages/core/sdk/src/editor/commands/Command.ts:20


updatable

updatable: boolean = false

Defined in: packages/core/sdk/src/editor/commands/Command.ts:19

Methods

execute()

abstract execute(): void

Defined in: packages/core/sdk/src/editor/commands/Command.ts:35

Returns

void


fromJSON()

fromJSON(json): void

Defined in: packages/core/sdk/src/editor/commands/Command.ts:53

Parameters

json

CommandJson

Returns

void


getAttributeName()

getAttributeName(): string[]

Defined in: packages/core/sdk/src/editor/commands/Command.ts:41

Returns

string[]


toJSON()

toJSON(): CommandJson

Defined in: packages/core/sdk/src/editor/commands/Command.ts:45

Returns

CommandJson


undo()

abstract undo(): void

Defined in: packages/core/sdk/src/editor/commands/Command.ts:37

Returns

void


update()

abstract update(command): void

Defined in: packages/core/sdk/src/editor/commands/Command.ts:39

Parameters

command

this

Returns

void