@makeen.io/material-ui-kit
Version:
Makeen UI components kit. Based on material-ui.
68 lines (67 loc) • 2.05 kB
TypeScript
export interface IColor {
color: string;
label?: string;
}
export interface IFontFamily {
label: string;
value: string;
}
export interface ITextHeading {
class: string;
model?: string;
title: string;
view: string;
}
export interface IMentionConfig {
enableAtSearch?: boolean;
enableHashSearch?: boolean;
atSearchSymbol?: string;
hashSearchSymbol?: string;
atValues?: mentionItemType[];
hashValues?: mentionItemType[];
renderMentionItem?: (item: any, searchTerm: any) => void;
mentionOnSelect?: (item: any, insertItem: any) => void;
renderMentionLoading?: () => string;
positioningStrategy?: "normal" | "fixed" | "absolute";
spaceAfterInsert?: boolean;
defaultMenuOrientation?: "top" | "bottom";
allowedChars?: RegExp;
suggestPeople?: (searchTerm: string) => Promise<(mentionItemType | any)[]>;
suggestTags?: (searchTerm: string) => Promise<(mentionItemType | any)[]>;
onMenuOpen?: () => void;
onMenuClose?: () => void;
}
export declare type toolbarItem = "undo" | "redo" | "|" | "heading" | "fontFamilyDropdown" | "fontSizeDropdown" | "insertStaticLink" | "customUpload" | "bold" | "italic" | "underline" | "fontColor" | "fontBackgroundColor" | "link" | "imageUpload" | "alignment:left" | "alignment:center" | "alignment:right" | "alignment:justify" | "numberedList" | "bulletedList";
export declare type mentionItemType = {
id: string | number;
label: string;
value: string;
};
export interface IEditorConfig {
fontBackgroundColor?: {
colors: IColor[];
columns: number;
};
fontColor?: {
colors: IColor[];
columns: number;
};
fontFamily?: {
options: IFontFamily[];
};
fontSize?: {
options: number[];
defaultSize: number;
};
heading?: {
options: ITextHeading[];
};
staticLink?: {
defaultText: string;
staticUrl: string;
};
toolbar: {
items: toolbarItem[];
};
mention?: IMentionConfig;
}