web-ui-pack
Version:
Web package with UI elements
37 lines (36 loc) • 1.45 kB
TypeScript
/** Represents contenteditable element with custom input props as value, select etc. */
export default class WUPTextareaInput extends HTMLElement {
#private;
static $use(): void;
static get $style(): string;
constructor();
$options: Record<string, any>;
connectedCallback(): void;
/** Makes the selection equal to the current object. */
select(): void;
get readOnly(): boolean;
set readOnly(v: boolean);
_cached?: string;
/** Get/set innerHTML (br converted into '\n') */
get value(): string;
set value(v: string);
/** Sets the start and end positions of a selection in a text field.
* @param start The offset into the text field for the start of the selection.
* @param end The offset into the text field for the end of the selection. */
setSelectionRange(start: number | null, end: number | null): void;
/** Gets or sets the starting position or offset of a text selection. */
get selectionStart(): number | null;
set selectionStart(v: number | null);
/** Gets or sets the end position or offset of a text selection. */
get selectionEnd(): number | null;
set selectionEnd(v: number | null);
/** Fix for contenteditable (it doesn't contain selectionStart & selectionEnd props) */
get selection(): null | {
start: number;
end: number;
};
set selection(sel: null | {
start: number;
end: number;
});
}