Add ^S save binding to editor; fix bullet point delete bug
This commit is contained in:
parent
9f361896ee
commit
407d26eb05
@ -127,7 +127,7 @@ export class HostComponent implements OnInit {
|
||||
const newLines = [];
|
||||
this.liItems.toArray().forEach((elem, index) => {
|
||||
if ( index !== i ) {
|
||||
newLines.push(elem.innerText ? elem.innerText.trim() : '');
|
||||
newLines.push(elem.nativeElement.innerText ? elem.nativeElement.innerText.trim() : '');
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<ng-container>
|
||||
<ion-header>
|
||||
<ion-header (keydown)="onEditorKeydown($event)">
|
||||
<ion-toolbar>
|
||||
<ion-buttons slot="start">
|
||||
<ion-menu-toggle>
|
||||
@ -14,7 +14,7 @@
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<ion-content (keydown)="onEditorKeydown($event)">
|
||||
<ng-container>
|
||||
<div class="editor-root ion-padding">
|
||||
<div
|
||||
|
@ -239,4 +239,11 @@ export class EditorPage implements OnInit {
|
||||
await popover.present();
|
||||
}
|
||||
|
||||
onEditorKeydown($event) {
|
||||
if ( $event.key === 's' && $event.ctrlKey ) {
|
||||
$event.preventDefault();
|
||||
this.onSaveClick();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user