///
export interface TributeComponentParams {
domId: string;
type: string;
organization: string;
ppm: string;
title: string;
wbsComponent: string;
workItem: string;
}
interface RichTextProps {
content: string;
getTributeComponent?: any;
}
export interface RichTextViewerProps extends RichTextProps {
onLinkClick?: (url: string) => void;
}
export interface RichTextEditorProps extends RichTextProps {
onCancel?: (content: string) => void;
onSave?: (content: string) => void;
saveButtonTitle?: string;
placeholder?: string;
tributes?: Array;
}
export declare type EditorMode = 'edit' | 'view';
export declare type TitlePosition = 'top' | 'left';
export interface EditableRichTextOptions {
canEdit: boolean;
editOnClick?: boolean;
initialMode?: EditorMode;
tributes?: any[];
getTributeComponent?: (params: any) => {
Component: JSX.Element;
Placeholder: JSX.Element;
};
}
export interface UseEditableRichTextProps {
actions?: {
onSave?: (content: string) => void;
setEditorMode?: React.Dispatch>;
};
options?: EditableRichTextOptions;
state?: {
content?: string;
editorMode?: EditorMode;
};
title?: React.ReactNode;
titlePosition?: TitlePosition;
}
export interface EditableRichTextProps {
actions: {
onSave: (content: string) => void;
setToEditMode?: () => void;
setToViewMode?: () => void;
};
options?: EditableRichTextOptions;
state: {
content: string;
editorMode?: EditorMode;
};
title?: React.ReactNode;
titlePosition?: TitlePosition;
}
export {};