mirror of
https://github.com/codex-team/editor.js
synced 2024-05-20 15:26:48 +02:00
7acf321454
* modification observer initials * add debouncer to callback execution * change feature name * update * code improvements * tslint fixes * use debouncer from utils * add types * upgrade * fix * update
58 lines
1 KiB
TypeScript
58 lines
1 KiB
TypeScript
import ISanitizerConfig from './sanitizer-config';
|
|
import IInputOutputData from './input-output-data';
|
|
import IToolSettings from './tools/tool-settings';
|
|
import ITool from './tools/tool';
|
|
|
|
/**
|
|
* Editor Instance config
|
|
*/
|
|
export default interface IEditorConfig {
|
|
|
|
/**
|
|
* Element to append Editor
|
|
*/
|
|
holderId: string;
|
|
|
|
/**
|
|
* Map of used Tools with or without configuration
|
|
*/
|
|
tools: {[toolName: string]: ITool|IToolSettings};
|
|
|
|
/**
|
|
* This Tool will be added by default
|
|
* Name should be equal a one Tool's key of Editor's Tools
|
|
*/
|
|
initialBlock: string;
|
|
|
|
/**
|
|
* Blocks list in JSON-format
|
|
*/
|
|
data?: IInputOutputData;
|
|
|
|
/**
|
|
* First Block placeholder
|
|
*/
|
|
placeholder?: string;
|
|
|
|
/**
|
|
* Define tags not to be stripped off while pasting
|
|
* @see {@link sanitizer}
|
|
*/
|
|
sanitizer?: ISanitizerConfig;
|
|
|
|
/**
|
|
* Do not show toolbar
|
|
*/
|
|
hideToolbar?: boolean;
|
|
|
|
/**
|
|
* Editor initialization callback
|
|
*/
|
|
onReady?(): void;
|
|
|
|
/**
|
|
* Trigger callback if Content has beed changed
|
|
*/
|
|
onChange?(): void;
|
|
}
|