@social-mail/social-mail-client 1.9.22 → 1.9.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@social-mail/social-mail-client",
3
- "version": "1.9.22",
3
+ "version": "1.9.23",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -764,6 +764,25 @@ export default class HtmlPageEditor extends AtomControl {
764
764
  this.hover.update(target);
765
765
  }, { capture: true });
766
766
 
767
+ this.bindEvent(this.element, "keydown", (e: KeyboardEvent) => {
768
+ if(e.ctrlKey || e.metaKey) {
769
+ switch(e.key) {
770
+ case "s":
771
+ this.contentEditor.dispatchEvent(new CustomEvent("savePage", { bubbles: true }));
772
+ e.preventDefault();
773
+ break;
774
+ case "z":
775
+ this.contentEditor.dispatchEvent(new CustomEvent("undo", { bubbles: true }));
776
+ e.preventDefault();
777
+ break;
778
+ case "y":
779
+ this.contentEditor.dispatchEvent(new CustomEvent("redo", { bubbles: true }));
780
+ e.preventDefault();
781
+ break;
782
+ }
783
+ }
784
+ });
785
+
767
786
  this.htmlDocument.addEventListener("keydown", (e) => {
768
787
  if(e.ctrlKey || e.metaKey) {
769
788
  switch(e.key) {