Skip to main content

EditorEvents

@blockslides/core


@blockslides/core / EditorEvents

Interface: EditorEvents

Defined in: blockslides/packages/core/src/types.ts:65

Properties

mount

mount: object

Defined in: blockslides/packages/core/src/types.ts:66

editor

editor: SlideEditor

The editor instance


unmount

unmount: object

Defined in: blockslides/packages/core/src/types.ts:72

editor

editor: SlideEditor

The editor instance


beforeCreate

beforeCreate: object

Defined in: blockslides/packages/core/src/types.ts:78

editor

editor: SlideEditor

The editor instance


create

create: object

Defined in: blockslides/packages/core/src/types.ts:84

editor

editor: SlideEditor

The editor instance


contentError

contentError: object

Defined in: blockslides/packages/core/src/types.ts:90

editor

editor: SlideEditor

The editor instance

error

error: Error

The error that occurred while parsing the content

disableCollaboration()

disableCollaboration: () => void

If called, will re-initialize the editor with the collaboration extension removed. This will prevent syncing back deletions of content not present in the current schema.

Returns

void


update

update: object

Defined in: blockslides/packages/core/src/types.ts:105

editor

editor: SlideEditor

The editor instance

transaction

transaction: Transaction

The transaction that caused the update

appendedTransactions

appendedTransactions: Transaction[]

Appended transactions that were added to the initial transaction by plugins


selectionUpdate

selectionUpdate: object

Defined in: blockslides/packages/core/src/types.ts:119

editor

editor: SlideEditor

The editor instance

transaction

transaction: Transaction

The transaction that caused the selection update


beforeTransaction

beforeTransaction: object

Defined in: blockslides/packages/core/src/types.ts:129

editor

editor: SlideEditor

The editor instance

transaction

transaction: Transaction

The transaction that will be applied

nextState

nextState: EditorState

The next state of the editor after the transaction is applied


transaction

transaction: object

Defined in: blockslides/packages/core/src/types.ts:143

editor

editor: SlideEditor

The editor instance

transaction

transaction: Transaction

The initial transaction

appendedTransactions

appendedTransactions: Transaction[]

Appended transactions that were added to the initial transaction by plugins


focus

focus: object

Defined in: blockslides/packages/core/src/types.ts:157

editor

editor: SlideEditor

The editor instance

event

event: FocusEvent

The focus event

transaction

transaction: Transaction

The transaction that caused the focus


blur

blur: object

Defined in: blockslides/packages/core/src/types.ts:171

editor

editor: SlideEditor

The editor instance

event

event: FocusEvent

The focus event

transaction

transaction: Transaction

The transaction that caused the blur


destroy

destroy: void

Defined in: blockslides/packages/core/src/types.ts:185


paste

paste: object

Defined in: blockslides/packages/core/src/types.ts:186

editor

editor: SlideEditor

The editor instance

event

event: ClipboardEvent

The clipboard event

slice

slice: Slice

The slice that was pasted


drop

drop: object

Defined in: blockslides/packages/core/src/types.ts:200

editor

editor: SlideEditor

The editor instance

event

event: DragEvent

The drag event

slice

slice: Slice

The slice that was dropped

moved

moved: boolean

Whether the content was moved (true) or copied (false)


delete

delete: object & { type: "node"; node: Node; newFrom: number; newTo: number; } | { type: "mark"; mark: Mark; }

Defined in: blockslides/packages/core/src/types.ts:218

Type Declaration

editor

editor: SlideEditor

The editor instance

deletedRange

deletedRange: Range

The range of the deleted content (before the deletion)

newRange

newRange: Range

The new range of positions of where the deleted content was in the new document (after the deletion)

transaction

transaction: Transaction

The transaction that caused the deletion

combinedTransform

combinedTransform: Transform

The combined transform (including all appended transactions) that caused the deletion

partial

partial: boolean

Whether the deletion was partial (only a part of this content was deleted)

from

from: number

This is the start position of the mark in the document (before the deletion)

to

to: number

This is the end position of the mark in the document (before the deletion)