UNPKG

@thi.ng/rdom-components

Version:

Collection of unstyled, customizable components for @thi.ng/rdom

29 lines 960 B
import type { Fn } from "@thi.ng/api"; import type { Attribs } from "@thi.ng/hiccup-html"; import { type TextAreaAttribs } from "@thi.ng/hiccup-html/forms"; import type { ISubscription } from "@thi.ng/rstream"; export interface EditorOpts { /** * Attribs for wrapper div. */ wrapper: Partial<Attribs>; editor: { /** * Attribs for textarea element */ attribs: Partial<TextAreaAttribs>; }; cursor: Partial<{ /** * Attribs for cursor position div */ attribs: Partial<Attribs>; /** * Optional format function for cursor position (receives * `[line,col]` tuple). Default: "1:2" */ format: Fn<number[], string>; }>; } export declare const editor: (src: ISubscription<string, string>, opts?: Partial<EditorOpts>) => [string, import("@thi.ng/api").Nullable<Partial<Attribs>>, ...any[]]; //# sourceMappingURL=editor.d.ts.map