UNPKG

@uva-glass/component-library

Version:

React components UvA

31 lines (30 loc) 1.56 kB
import { RefObject } from 'react'; import { LexicalEditor } from 'lexical'; export interface RteEditorProps { /** current language setting for the editor labels NOT title ans label */ currentLanguage?: 'NL' | 'EN'; /** imported content to edit */ initialValue?: string; /** placeholder text in current Language */ placeholder?: string; /** label/title of the RTE in current Language */ label?: string; /** explanation of the text to be filled in, in current Language */ info?: string; /** 'true' the rte field mandatory */ required?: boolean; /** `true` to color border red to show not valid; otherwise, `false`. */ notValid?: boolean; /** error text to display if required and field is empty */ notValidatedText?: string; /** max height in rem default = 20rem*/ maxHeightInRem?: `${number}rem`; /** max number of words 'allowed' but not enforced */ maxWords?: number; /** Ref to the Lexical editor instance */ rteRef?: RefObject<LexicalEditor> | null; /** updated output */ onChange: (content: string) => void; } export declare const Rte: ({ currentLanguage, initialValue, placeholder, label, info, required, notValid, notValidatedText, maxHeightInRem, maxWords, rteRef, onChange, }: RteEditorProps) => import("react/jsx-runtime").JSX.Element; export declare const RteEditor: ({ currentLanguage, initialValue, placeholder, label, info, required, notValid, notValidatedText, maxWords, rteRef, onChange, }: RteEditorProps) => import("react/jsx-runtime").JSX.Element;