editor.js/types/index.d.ts
George Berezhnoy 669c11eaa5
Paste handling improvements (#534)
* Make on paste callback non-static method

* Add docs

* change tools.md header levels

* some docs improvements

* upd docs

* Types improvements

* add image tool for testing

* Fix file drag'n'drop

* improve log on paste

* Update submodules

* Update bundle

* Update paragraph submodule

* Fix some bugs with blocks replacement
Remove tag from HTMLPasteEvent

* Use production webpack mode

* minimize: true

* Update docs

* Update submodules

* Update bundle
2018-11-29 12:16:06 +03:00

78 lines
1.7 KiB
TypeScript

/**
* For export type there should be one entry point,
* so we export all types from this file
* ------------------------------------
*/
import {EditorConfig} from './configs';
import {Blocks, Caret, Events, Listeners, Notifier, Sanitizer, Saver, Selection, Styles, Toolbar} from './api';
/**
* Interfaces used for development
*/
export {
Tool,
ToolConstructable,
InlineTool,
InlineToolConstructable,
BlockToolConstructable,
BlockTool,
BlockToolData,
ToolSettings,
ToolConfig,
PasteEvent,
PasteEventDetail,
PatternPasteEvent,
PatternPasteEventDetail,
HTMLPasteEvent,
HTMLPasteEventDetail,
FilePasteEvent,
FilePasteEventDetail,
} from './tools';
export {BlockTune, BlockTuneConstructable} from './block-tunes';
export {EditorConfig, SanitizerConfig, PasteConfig} from './configs';
export {OutputData} from './data-formats/output-data';
/**
* We have a namespace API {@link ./api/index.d.ts} (APIMethods) but we can not use it as interface
* So we should create new interface for exporting API type
*/
export interface API {
blocks: Blocks;
caret: Caret;
events: Events;
listeners: Listeners;
notifier: Notifier;
sanitizer: Sanitizer;
saver: Saver;
selection: Selection;
styles: Styles;
toolbar: Toolbar;
}
/**
* Main Editor class
*/
declare class EditorJS {
public static version: string;
public isReady: Promise<void>;
public blocks: Blocks;
public caret: Caret;
public events: Events;
public listeners: Listeners;
public sanitizer: Sanitizer;
public saver: Saver;
public selection: Selection;
public styles: Styles;
public toolbar: Toolbar;
constructor(configuration?: EditorConfig|string);
public destroy(): void;
}
export as namespace EditorJS;
export default EditorJS;