mirror of
https://github.com/codex-team/editor.js
synced 2024-06-13 03:12:21 +02:00
30 lines
565 B
TypeScript
30 lines
565 B
TypeScript
|
export interface IBlockTuneConstructor {
|
||
|
new (data: {api: any, settings: any});
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* BlockTune interface
|
||
|
*
|
||
|
* All tunes must implement this interface
|
||
|
*/
|
||
|
export interface IBlockTune {
|
||
|
/**
|
||
|
* Settings will be described later
|
||
|
*/
|
||
|
settings?: object;
|
||
|
|
||
|
/**
|
||
|
* Returns tune button that will be appended in default settings area
|
||
|
*/
|
||
|
render(): HTMLElement;
|
||
|
|
||
|
/**
|
||
|
* handle Click event
|
||
|
* @param {MouseEvent} event
|
||
|
* @param {HTMLElement} button
|
||
|
*/
|
||
|
handleClick(event: MouseEvent, button: HTMLElement): void;
|
||
|
}
|
||
|
|
||
|
export default IBlockTune;
|