UNPKG

@dotcms/react

Version:

Official React Components library to render a dotCMS page.

37 lines (36 loc) 1.18 kB
import { IAllProps } from '@tinymce/tinymce-react'; import { DotCMSBasicContentlet } from '@dotcms/types'; export type DOT_EDITABLE_TEXT_FORMAT = 'html' | 'text'; export type DOT_EDITABLE_TEXT_MODE = 'minimal' | 'full' | 'plain'; export interface DotCMSEditableTextProps<T extends DotCMSBasicContentlet> { /** * Represents the field name of the `contentlet` that can be edited * * @memberof DotCMSEditableTextProps */ fieldName: keyof T; /** * Represents the format of the editor which can be `text` or `html` * * @type {DOT_EDITABLE_TEXT_FORMAT} * @memberof DotCMSEditableTextProps */ format?: DOT_EDITABLE_TEXT_FORMAT; /** * Represents the mode of the editor which can be `plain`, `minimal`, or `full` * * @type {DOT_EDITABLE_TEXT_MODE} * @memberof DotCMSEditableTextProps */ mode?: DOT_EDITABLE_TEXT_MODE; /** * Represents the `contentlet` that can be inline edited * * @type {DotCMSBasicContentlet} * @memberof DotCMSEditableTextProps */ contentlet: T; } export declare const TINYMCE_CONFIG: { [key in DOT_EDITABLE_TEXT_MODE]: IAllProps['init']; };