mirror of
https://github.com/codex-team/editor.js
synced 2024-06-10 09:52:36 +02:00
494d6e4b9b
* fix: use type imports for block events * add changelog entry --------- Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
22 lines
482 B
TypeScript
22 lines
482 B
TypeScript
import type { BlockMutationEventDetail } from './Base';
|
|
|
|
/**
|
|
* Type name of CustomEvent related to block changed event
|
|
*/
|
|
export const BlockChangedMutationType = 'block-changed';
|
|
|
|
/**
|
|
* Information about changed block
|
|
*/
|
|
interface BlockChangedEventDetail extends BlockMutationEventDetail {
|
|
/**
|
|
* Index of changed block
|
|
*/
|
|
index: number;
|
|
}
|
|
|
|
/**
|
|
* Event will be fired when some block is changed
|
|
*/
|
|
export type BlockChangedEvent = CustomEvent<BlockChangedEventDetail>;
|