UNPKG

@mdefy/ngx-markdown-editor

Version:

An Angular Markdown Editor in WYSIWYG style with extensive functionality, high customizability and an integrated material theme.

19 lines (18 loc) 748 B
import { EventManager } from '@angular/platform-browser'; import { Observable } from 'rxjs'; /** * An injectable hotkeys service to add keybindings. */ export declare class Keybindings { private eventManager; constructor(eventManager: EventManager); /** * Adds an _keydown_ event listener to the Angular `EventManager` with the specified * `keys`. The listener is applied to specified `element`. Returns an RxJS observable * of the keyboard event. * * @param element The HTML element to which the keybinding shall be applied to. * @param keys The key combination which shall trigger the event. */ addKeybinding(element: HTMLElement, keys: string): Observable<KeyboardEvent>; }