UNPKG

@cc98/react-ubb-editor

Version:
27 lines (26 loc) 820 B
import React from 'react'; export interface IProps extends React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement> { onChange: (value: string) => void; value: string; ref?: any; } interface IState { valueStack: string[]; redoStack: string[]; } export default class Textarea extends React.PureComponent<IProps, IState> { static getDerivedStateFromProps(nextProps: IProps, prevState: IState): { valueStack: string[]; redoStack: string[]; } | null; constructor(props: IProps); private scrollTop; textarea: HTMLTextAreaElement; undo: () => void; redo: () => void; blur: () => void; private changeValue; handleFocus: (e: React.FocusEvent<HTMLTextAreaElement>) => void; render(): JSX.Element; } export {};