jodit-pro
Version:
PRO Version of Jodit Editor
225 lines (224 loc) • 7.12 kB
TypeScript
import type { IAIAssistantProOptions } from "./plugins/ai-assistant-pro/interface/index";
import type { IAutoCompleteItem } from "./plugins/autocomplete/interface";
import type { AutoCompleteSource } from "./plugins/autocomplete/interface";
import type { ISnapshotStorage } from "./plugins/backup/interface";
import type { IEmojiData } from "./plugins/emoji/interface";
import type { AjaxOptions } from "jodit/esm/types/index";
import type { DeepPartial } from "jodit/esm/types/index";
import type { IUIMapBaseState } from "./plugins/google-maps/interface";
import type { ICircleState } from "./plugins/google-maps/interface";
import type { IPolygonState } from "./plugins/google-maps/interface";
import type { IPolylineState } from "./plugins/google-maps/interface";
import type { IMarkerState } from "./plugins/google-maps/interface";
import type { ITextState } from "./plugins/google-maps/interface";
import type { HTMLTagNames } from "jodit/esm/types/index";
import type { IDictionary } from "jodit/esm/types/index";
import type { IJodit } from "jodit/esm/types/index";
import type { IKeys } from "./plugins/keyboard/interface";
import type { ButtonGroup } from "jodit/esm/types/index";
import type { ILayoutKeys } from "./plugins/keyboard/interface";
import type { CanPromise } from "jodit/esm/types/index";
import type { IUIOption } from "jodit/esm/types/index";
import type { IStyleDefinition } from "./plugins/style/interface";
import type { ITranslateProviderFactory } from "./plugins/translate/interface";
import type { IGoogleTranslateProviderOptions } from "./plugins/translate/interface";
import type { IControlType } from "jodit/esm/types/index";
declare module 'jodit/esm/config' {
interface Config {
loadExternalConfig: boolean;
}
}
export { Config };
interface Config {
loadExternalConfig: boolean;
}
interface Config {
aiAssistantPro: IAIAssistantProOptions;
}
interface Config {
autocomplete: {
maxItems: number;
isMatchedQuery: (query: string, value: string) => boolean;
itemRenderer: <T = any>(item: IAutoCompleteItem<T>) => string | HTMLElement;
insertValueRenderer: <T = any>(item: IAutoCompleteItem<T>) => string | HTMLElement;
sources: AutoCompleteSource[];
};
}
interface Config {
backup: {
interval: number;
limit: number;
remoteStore?: ISnapshotStorage;
dialogWidth: number;
hotkeys: string[];
formatDate?: (timestamp: string | Date) => string;
};
}
interface Config {
emoji: {
data: () => Promise<IEmojiData>;
enableAutoComplete: boolean;
recentCountLimit: number;
};
}
interface Config {
exportDocs: {
ajax?: AjaxOptions;
css: string;
pdf: {
allow: boolean;
externalFonts: string[];
options: {
defaultFont: 'courier' | 'courier-bold' | 'courier-oblique' | 'courier-boldoblique' | 'helvetica' | 'helvetica-bold' | 'helvetica-oblique' | 'helvetica-boldoblique' | 'times-roman' | 'times-bold' | 'times-italic' | 'times-bolditalic' | 'symbol' | 'zapfdingbats';
/**
* Page format. Default is A4
*/
format: 'A4' | 'A3' | 'A5' | 'Letter' | 'Legal';
page_orientation: 'landscape' | 'portrait';
};
};
};
}
interface Config {
googleMaps: {
saveStateInStorage: boolean;
useStaticImage: boolean;
apiUrl: string;
API_KEY: string;
inlineEditorOptions: DeepPartial<Config>;
dialog: {
size: [
number,
number
];
};
map: {
center: 'auto' | [
number,
number
];
type: IUIMapBaseState['type'];
layer: IUIMapBaseState['layer'];
defaultCenter: IUIMapBaseState['center'];
defaultZoom: number;
zoom: number;
size: [
number,
number
];
defaultStates: {
circle: Partial<ICircleState>;
polygon: Partial<IPolygonState>;
polyline: Partial<IPolylineState>;
marker: Partial<IMarkerState>;
text: Partial<ITextState>;
};
};
};
}
interface Config {
highlightSignature: {
processDelay: number;
processInChunkCount: number;
excludeTags: HTMLTagNames[];
schema: IDictionary<(jodit: IJodit, matches: RegExpMatchArray) => HTMLElement>;
};
}
interface Config {
keyboard: {
keySize: number;
layout: number[][];
extraKeyButtons: Array<IKeys | string>;
extraKeyGroup: ButtonGroup;
layoutList: IDictionary<ILayoutKeys>;
defaultLayoutSet: string;
showLayoutSwitcher: boolean;
layoutSwitchList: string[];
delayKeyRepeat: number;
periodKeyRepeat: number;
};
}
interface Config {
mobileView: {
mode: string | number;
};
}
interface Config {
pageBreak: {
separator: string;
};
}
interface Config {
pasteCode: {
globalHighlightLib: boolean;
canonicalLanguageCode: (lang: string) => string;
highlightLib: {
highlight: (code: string, language: string) => string;
isLangLoaded: (lang: string) => boolean;
langUrl: (lang: string) => string;
beforeLibLoad?: () => CanPromise<void>;
afterLibLoad?: () => CanPromise<void>;
js: string[];
css: string[];
};
defaultLanguage: string;
languages: IUIOption[];
insertTemplate: (jodit: IJodit, language: string, value: string) => string;
dialog: {
width: number;
height: number;
};
};
}
interface Config {
pasteFromWord: {
/**
* Turn off heuristic analysis when pasting from word
*/
enable: boolean;
/**
* Convert units to px
*/
convertUnitsToPixel: boolean;
/**
* List of attributes which should not be removed when pasting from word
*/
allowedStyleProps?: string[];
};
}
interface Config {
showBlocks: {
enable: boolean;
color: string;
tagList: string[];
};
}
interface Config {
customStyles: {
definitions: IStyleDefinition[];
};
}
interface Config {
todoList: {
className: string;
labelClassName: string;
inputFactory: (jodit: IJodit) => HTMLElement;
};
}
interface Config {
translate: {
hotkeys: {
translateSelection: string[];
translateOptions: string[];
};
provider: 'google' | ITranslateProviderFactory;
googleProviderOptions: IGoogleTranslateProviderOptions;
defaultSourceLang: string;
defaultTargetLang: string;
};
}
interface Config {
tuneBlock: {
popup: IDictionary<Array<IControlType | string>>;
};
}