Skip to main content

Extension

@blockslides/core


@blockslides/core / Extension

Class: Extension<Options, Storage>

Defined in: blockslides/packages/core/src/Extension.ts:13

Extends

Type Parameters

Options

Options = any

Storage

Storage = any

Constructors

Constructor

new Extension<Options, Storage>(config): Extension<Options, Storage>

Defined in: blockslides/packages/core/src/Extendable.ts:370

Parameters

config

Partial<Config> = {}

Returns

Extension<Options, Storage>

Inherited from

Extendable.constructor

Properties

parent

parent: Extendable<any, any, ExtensionConfig<any, any> | NodeConfig<any, any> | MarkConfig<any, any>> | null = null

Defined in: blockslides/packages/core/src/Extendable.ts:360

Inherited from

Extendable.parent


child

child: Extendable<any, any, ExtensionConfig<any, any> | NodeConfig<any, any> | MarkConfig<any, any>> | null = null

Defined in: blockslides/packages/core/src/Extendable.ts:362

Inherited from

Extendable.child


name

name: string = ""

Defined in: blockslides/packages/core/src/Extendable.ts:364

Inherited from

Extendable.name


config

config: ExtensionConfig

Defined in: blockslides/packages/core/src/Extendable.ts:366

Inherited from

Extendable.config


type

type: string = "extension"

Defined in: blockslides/packages/core/src/Extension.ts:18

Overrides

Extendable.type

Accessors

options

Get Signature

get options(): Options

Defined in: blockslides/packages/core/src/Extendable.ts:379

Returns

Options

Inherited from

Extendable.options


storage

Get Signature

get storage(): Readonly<Storage>

Defined in: blockslides/packages/core/src/Extendable.ts:389

Returns

Readonly<Storage>

Inherited from

Extendable.storage

Methods

create()

static create<O, S>(config): Extension<O, S>

Defined in: blockslides/packages/core/src/Extension.ts:24

Create a new Extension instance

Type Parameters

O

O = any

S

S = any

Parameters

config

Extension configuration object or a function that returns a configuration object

Partial<ExtensionConfig<O, S>> | () => Partial<ExtensionConfig<O, S>>

Returns

Extension<O, S>


configure()

configure(options?): Extension<Options, Storage>

Defined in: blockslides/packages/core/src/Extension.ts:34

Parameters

options?

Partial<Options>

Returns

Extension<Options, Storage>

Overrides

Extendable.configure


extend()

extend<ExtendedOptions, ExtendedStorage, ExtendedConfig>(extendedConfig?): Extension<ExtendedOptions, ExtendedStorage>

Defined in: blockslides/packages/core/src/Extension.ts:38

Type Parameters

ExtendedOptions

ExtendedOptions = Options

ExtendedStorage

ExtendedStorage = Storage

ExtendedConfig

ExtendedConfig = ExtensionConfig<ExtendedOptions, ExtendedStorage>

Parameters

extendedConfig?

() => Partial<ExtendedConfig> | Partial<ExtendedConfig> & ThisType<{ name: string; options: ExtendedOptions; storage: ExtendedStorage; editor: SlideEditor; type: null; }>

Returns

Extension<ExtendedOptions, ExtendedStorage>

Overrides

Extendable.extend