mirror of
https://github.com/codex-team/editor.js
synced 2024-05-06 08:33:20 +02:00
63eeec0f3b
Co-authored-by: George Berezhnoy <gohabereg@users.noreply.github.com> Co-authored-by: Georgy Berezhnoy <gohabereg@gmail.com> Co-authored-by: tasuku-s <tasuku@freemind.co.jp> Co-authored-by: Athul Anil Kumar <athul7744@outlook.com> Co-authored-by: Taly <vitalik7tv@yandex.ru> Co-authored-by: flaming-cl <51183663+flaming-cl@users.noreply.github.com> Co-authored-by: Nguyen Ngoc Son <sonnn.se@gmail.com> Co-authored-by: Sisir Das K <37764463+sis-dk@users.noreply.github.com> Co-authored-by: Sisir <sisir@hellosivi.com>
82 lines
1.7 KiB
TypeScript
82 lines
1.7 KiB
TypeScript
import {ToolConstructable, ToolSettings} from '../tools';
|
|
import {API, LogLevels, OutputData} from '../index';
|
|
import {SanitizerConfig} from './sanitizer-config';
|
|
import {I18nConfig} from './i18n-config';
|
|
|
|
export interface EditorConfig {
|
|
/**
|
|
* Element where Editor will be append
|
|
* @deprecated property will be removed in the next major release, use holder instead
|
|
*/
|
|
holderId?: string | HTMLElement;
|
|
|
|
/**
|
|
* Element where Editor will be append
|
|
*/
|
|
holder?: string | HTMLElement;
|
|
|
|
/**
|
|
* If true, set caret at the first Block after Editor is ready
|
|
*/
|
|
autofocus?: boolean;
|
|
|
|
/**
|
|
* This Tool will be used as default
|
|
* Name should be equal to one of Tool`s keys of passed tools
|
|
* If not specified, Paragraph Tool will be used
|
|
*/
|
|
initialBlock?: string;
|
|
|
|
/**
|
|
* First Block placeholder
|
|
*/
|
|
placeholder?: string|false;
|
|
|
|
/**
|
|
* Define default sanitizer configuration
|
|
* @see {@link sanitizer}
|
|
*/
|
|
sanitizer?: SanitizerConfig;
|
|
|
|
/**
|
|
* If true, toolbar won't be shown
|
|
*/
|
|
hideToolbar?: boolean;
|
|
|
|
/**
|
|
* Map of Tools to use
|
|
*/
|
|
tools?: {[toolName: string]: ToolConstructable|ToolSettings};
|
|
|
|
/**
|
|
* Data to render on Editor start
|
|
*/
|
|
data?: OutputData;
|
|
|
|
/**
|
|
* Height of Editor's bottom area that allows to set focus on the last Block
|
|
*/
|
|
minHeight?: number;
|
|
|
|
/**
|
|
* Editors log level (how many logs you want to see)
|
|
*/
|
|
logLevel?: LogLevels;
|
|
|
|
/**
|
|
* Internalization config
|
|
*/
|
|
i18n?: I18nConfig;
|
|
|
|
/**
|
|
* Fires when Editor is ready to work
|
|
*/
|
|
onReady?(): void;
|
|
|
|
/**
|
|
* Fires when something changed in DOM
|
|
* @param {API} api - editor.js api
|
|
*/
|
|
onChange?(api: API): void;
|
|
}
|