dictate-button
Version:
Customizable Web Component that adds speech-to-text dictation capabilities to text fields
21 lines (20 loc) • 925 B
TypeScript
import { InjectDictateButtonOptions } from './injectDictateButton';
/**
* Options for injecting the dictate button on load, extends the base options.
*/
export interface InjectDictateButtonOnLoadOptions extends InjectDictateButtonOptions {
/** Whether to watch for DOM changes and re-inject the component */
watchDomChanges?: boolean;
}
/**
* Add a DOMContentLoaded event listener which injects the dictate-button component to text fields
* or run it immediately if DOM is already loaded.
*
* Optionally watch for DOM changes to re-inject the component.
*
* Optionally log button events to the console (verbose mode).
*
* @param {string} textFieldSelector - CSS selector for text fields to enhance
* @param {InjectDictateButtonOnLoadOptions} options - Configuration options
*/
export declare function injectDictateButtonOnLoad(textFieldSelector: string, options?: InjectDictateButtonOnLoadOptions): void;