augnitosdk
Version:
AugnitoSDK lets you make use of the Speech Recognition AI. You can edit, format and complete reports at the speed of human speech, with the best-in-class accuracy
36 lines (35 loc) • 1.48 kB
TypeScript
import { InteropProcessor } from '../processors/InteropProcessor';
import { EditorType } from './EditorType';
import { TargetEditor } from './TargetEditor';
export declare class ProcessorHandler {
private _listOfControls;
private _enableLogs;
private _editorType?;
private _interopProcessors;
private _logTag;
constructor(_listOfControls: TargetEditor[], _enableLogs: boolean, _editorType?: EditorType | undefined);
/**
* returns an interop processor for the provided element. If a list of controls
* is present the processor only checks within the editors present on the list.
* If there is no list of controls only html interop processor is checked for.
* @param editor HTMLElement editor
* @returns an adequate processor if one found
*/
getProcessorForEditor(editor: Element): InteropProcessor;
/**
* Checks if the current focused editor is a valid editor
* @returns If it is valid, returns current editor Element; otherwise returns false
*/
getValidEditor(): Element | null;
private getActiveEditorElement;
/**
* checks if an editor is a valid element to interact with. If a list of control is present
* the Editor must be within the list
* @param editor Element holding the editor
* @returns true if it's valid
*/
private isValidEditor;
private getProcessor;
private isHtmlEditor;
private isContentEditable;
}