Basic link support using mouse zone manager

This commit is contained in:
Daniel Imms
2017-09-03 11:20:29 -07:00
parent 2d1a1bfb76
commit 5619abe12d
5 changed files with 186 additions and 210 deletions
+2 -1
View File
@@ -6,12 +6,13 @@ export type LinkMatcher = {
id: number,
regex: RegExp,
handler: LinkMatcherHandler,
hoverCallback?: LinkMatcherHandler,
matchIndex?: number,
validationCallback?: LinkMatcherValidationCallback,
priority?: number
};
export type LinkMatcherHandler = (event: MouseEvent, uri: string) => boolean | void;
export type LinkMatcherValidationCallback = (uri: string, element: HTMLElement, callback: (isValid: boolean) => void) => void;
export type LinkMatcherValidationCallback = (uri: string, callback: (isValid: boolean) => void) => void;
export type CustomKeyEventHandler = (event: KeyboardEvent) => boolean;
export type Charset = {[key: string]: string};