UNPKG

json-joy

Version:

Collection of libraries for building collaborative editing apps.

17 lines (16 loc) 777 B
import type { CollaborativeStr } from 'collaborative-editor'; export interface CollaborativeInputProps extends React.InputHTMLAttributes<HTMLInputElement> { /** Ref to the input element. */ inp?: (el: HTMLInputElement | HTMLTextAreaElement | null) => void; /** JSON CRDT "str" node API. */ str: () => CollaborativeStr; /** * Whether to poll for updates the underlying <input> or <textarea> element * in case some third-party code modifies the value of the input element. */ polling?: boolean; /** Whether the input is multiline. */ multiline?: boolean; input?: (inp: (el: HTMLInputElement | HTMLTextAreaElement | null) => void) => React.ReactNode; } export declare const CollaborativeInput: React.FC<CollaborativeInputProps>;