listen to command a and select the active element. (#8969)

* listen to command a and select the active element.

* type fix
This commit is contained in:
Maddy
2020-01-29 16:55:59 -08:00
committed by GitHub
parent de27f2c2a5
commit 648287fa85

View File

@@ -68,6 +68,14 @@ export class TextCellComponent extends CellView implements OnInit, OnChanges {
this._model.updateActiveCell(undefined);
}
@HostListener('document:keydown.meta.a', ['$event'])
onkeydown(e) {
// use preventDefault() to avoid invoking the editor's select all
// select the active .
e.preventDefault();
document.execCommand('selectAll');
}
private _content: string | string[];
private _lastTrustedMode: boolean;
private isEditMode: boolean;