UNPKG

@point-api/dropdown-react

Version:

HOC to add a Point API autocomplete dropdown

22 lines (21 loc) 777 B
import EditableAdapter from "./EditableAdapter"; declare class TextAreaAdapter implements EditableAdapter { el: HTMLInputElement | HTMLTextAreaElement; private readonly supportsAutoInsert; /** * Expose EditableAdapter API functions for a TextArea or Input element * @param el - TextArea or Input element to wrap */ constructor(el: HTMLInputElement | HTMLTextAreaElement, supportsAutoInsert?: boolean); readonly text: string; insertText(text: string): void; private stripRichText; replaceText(match: RegExpExecArray, newText: string): void; getCursorIndex(): number | null; setCursorIndex(index: number): void; getCaretPos(): { top: number; left: number; } | null; } export default TextAreaAdapter;