@etsoo/editor
Version:
ETSOO Free WYSIWYG HTML Editor
162 lines (161 loc) • 3.82 kB
TypeScript
import { IEOEditor } from "../IEOEditor";
/**
* EOEditor command interface
*/
export interface IEOEditorCommand {
/**
* Icon
*/
icon: string;
/**
* Label
*/
label?: string;
/**
* Action
*/
action?: (editor: IEOEditor) => boolean;
/**
* Detect tag name
*/
detectTag?: string;
/**
* Detect style name and value
*/
detectStyle?: [string, string];
}
/**
* EOEditor icon command interface
*/
export interface IEOEditorIconCommand {
/**
* Name
*/
name: string;
/**
* Icon
*/
icon: string;
/**
* Label
*/
label: string;
/**
* Action
*/
action?: () => void;
}
/**
* EOEditor separator
*/
export declare const EOEditorSeparator: IEOEditorCommand & IEOEditorIconCommand;
/**
* EOEditor command creator interface
*/
export interface IEOEditorCommandCreator {
/**
* Name
*/
name: EOEditorCommandKey;
/**
* Command
*/
command: IEOEditorCommand;
/**
* Sub commands
*/
subs?: EOEditorCommandKey[];
}
/**
* EOEditor commands interface
*/
export interface IEOEditorCommands {
about: IEOEditorCommand;
align: IEOEditorCommand;
backColor: IEOEditorCommand;
bold: IEOEditorCommand;
code: IEOEditorCommand;
copy: IEOEditorCommand;
custom1: IEOEditorCommand;
custom2: IEOEditorCommand;
custom3: IEOEditorCommand;
cut: IEOEditorCommand;
decreaseFontSize: IEOEditorCommand;
delete: IEOEditorCommand;
foreColor: IEOEditorCommand;
formatBlock: IEOEditorCommand;
fullscreen: IEOEditorCommand;
h1: IEOEditorCommand;
h2: IEOEditorCommand;
h3: IEOEditorCommand;
h4: IEOEditorCommand;
h5: IEOEditorCommand;
h6: IEOEditorCommand;
hp: IEOEditorCommand;
iframe: IEOEditorCommand;
increaseFontSize: IEOEditorCommand;
indent: IEOEditorCommand;
insertHorizontalRule: IEOEditorCommand;
insertImage: IEOEditorCommand;
insertOrderedList: IEOEditorCommand;
insertTable: IEOEditorCommand;
insertText: IEOEditorCommand;
insertUnorderedList: IEOEditorCommand;
italic: IEOEditorCommand;
justifyCenter: IEOEditorCommand;
justifyFull: IEOEditorCommand;
justifyLeft: IEOEditorCommand;
justifyRight: IEOEditorCommand;
link: IEOEditorCommand;
lock: IEOEditorCommand;
more: IEOEditorCommand;
object: IEOEditorCommand;
outdent: IEOEditorCommand;
paste: IEOEditorCommand;
redo: IEOEditorCommand;
removeFormat: IEOEditorCommand;
s: IEOEditorCommand;
source: IEOEditorCommand;
strikeThrough: IEOEditorCommand;
style: IEOEditorCommand;
subscript: IEOEditorCommand;
symbols: IEOEditorCommand;
superscript: IEOEditorCommand;
textbox: IEOEditorCommand;
underline: IEOEditorCommand;
undo: IEOEditorCommand;
unlink: IEOEditorCommand;
video: IEOEditorCommand;
}
/**
* EOEditor command key
*/
export type EOEditorCommandKey = keyof IEOEditorCommands;
/**
* EOEditor other SVG paths
*/
export declare const EOEditorSVGs: {
arrayRight: string;
edit: string;
tableEdit: string;
tableColumnAddAfter: string;
tableColumnAddBefore: string;
tableColumnRemove: string;
tableMergeCells: string;
tableRemove: string;
tableRowAddAfter: string;
tableRowAddBefore: string;
tableRowRemove: string;
tableSplitCell: string;
upload: string;
floatCenter: string;
floatLeft: string;
floatNone: string;
floatRight: string;
};
/**
* EOEditor all supported commands
* Icons: https://materialdesignicons.com/
*/
export declare const EOEditorCommands: IEOEditorCommands;
export declare function EOEditorCommandsParse(commands: string | null | undefined): IEOEditorCommandCreator[];