UNPKG

@selfcommunity/react-ui

Version:

React UI Components to integrate a Community created with SelfCommunity Platform.

54 lines (53 loc) 1.32 kB
import React from 'react'; export type EditorRef = { focus: () => void; }; export interface EditorProps { /** * Id of the feed object * @default 'poll' */ id?: string; /** * Overrides or extends the styles applied to the component. * @default null */ className?: string; /** * Default value for the editor * @default null */ defaultValue?: string; /** * Is the content of the editor read only * @default true */ editable?: boolean; /** * Show the toolbar on top of the editor, elsewhere show buttons at the bottom of the editor * @default false */ toolbar?: boolean; /** * This editor can upload images and insert into the html dom * @default false */ uploadImage?: boolean; /** * Handler for change event of the editor * @default null * */ onChange?: (value: string) => void; /** * Handler for blur event of the editor * @default null * */ onBlur?: (event: FocusEvent) => void; /** * Handler for focus event of the editor * @default null * */ onFocus?: (event: FocusEvent) => void; } declare const _default: React.ForwardRefExoticComponent<EditorProps & React.RefAttributes<EditorRef>>; export default _default;