mirror of
https://github.com/fastmail/Squire.git
synced 2024-12-22 07:13:08 -05:00
Release v2.2.8
This commit is contained in:
parent
d2e211796b
commit
72bfb9232f
10 changed files with 42 additions and 33 deletions
|
@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file, starting fr
|
||||||
|
|
||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [2.2.8] - 2024-02-21
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fix some keyboard shortcuts not working on some platforms.
|
||||||
|
- Fix unable to paste text with new line on Android.
|
||||||
|
|
||||||
## [2.2.7] - 2024-02-21
|
## [2.2.7] - 2024-02-21
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
14
dist/squire-raw.js
vendored
14
dist/squire-raw.js
vendored
|
@ -1909,6 +1909,10 @@
|
||||||
}
|
}
|
||||||
let key = event.key;
|
let key = event.key;
|
||||||
let modifiers = "";
|
let modifiers = "";
|
||||||
|
const code = event.code;
|
||||||
|
if (/^Digit\d$/.test(code)) {
|
||||||
|
key = code.slice(-1);
|
||||||
|
}
|
||||||
if (key !== "Backspace" && key !== "Delete") {
|
if (key !== "Backspace" && key !== "Delete") {
|
||||||
if (event.altKey) {
|
if (event.altKey) {
|
||||||
modifiers += "Alt-";
|
modifiers += "Alt-";
|
||||||
|
@ -2044,7 +2048,10 @@
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
self.undo();
|
self.undo();
|
||||||
};
|
};
|
||||||
keyHandlers[ctrlKey + "y"] = keyHandlers[ctrlKey + "Shift-z"] = (self, event) => {
|
keyHandlers[ctrlKey + "y"] = // Depending on platform, the Shift may cause the key to come through as
|
||||||
|
// upper case, but sometimes not. Just add both as shortcuts — the browser
|
||||||
|
// will only ever fire one or the other.
|
||||||
|
keyHandlers[ctrlKey + "Shift-z"] = keyHandlers[ctrlKey + "Shift-Z"] = (self, event) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
self.redo();
|
self.redo();
|
||||||
};
|
};
|
||||||
|
@ -2226,11 +2233,6 @@
|
||||||
}
|
}
|
||||||
_beforeInput(event) {
|
_beforeInput(event) {
|
||||||
switch (event.inputType) {
|
switch (event.inputType) {
|
||||||
case "insertText":
|
|
||||||
if (isAndroid && event.data && event.data.includes("\n")) {
|
|
||||||
event.preventDefault();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case "insertLineBreak":
|
case "insertLineBreak":
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
this.splitBlock(true);
|
this.splitBlock(true);
|
||||||
|
|
14
dist/squire-raw.mjs
vendored
14
dist/squire-raw.mjs
vendored
|
@ -1906,6 +1906,10 @@ var _onKey = function(event) {
|
||||||
}
|
}
|
||||||
let key = event.key;
|
let key = event.key;
|
||||||
let modifiers = "";
|
let modifiers = "";
|
||||||
|
const code = event.code;
|
||||||
|
if (/^Digit\d$/.test(code)) {
|
||||||
|
key = code.slice(-1);
|
||||||
|
}
|
||||||
if (key !== "Backspace" && key !== "Delete") {
|
if (key !== "Backspace" && key !== "Delete") {
|
||||||
if (event.altKey) {
|
if (event.altKey) {
|
||||||
modifiers += "Alt-";
|
modifiers += "Alt-";
|
||||||
|
@ -2041,7 +2045,10 @@ keyHandlers[ctrlKey + "z"] = (self, event) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
self.undo();
|
self.undo();
|
||||||
};
|
};
|
||||||
keyHandlers[ctrlKey + "y"] = keyHandlers[ctrlKey + "Shift-z"] = (self, event) => {
|
keyHandlers[ctrlKey + "y"] = // Depending on platform, the Shift may cause the key to come through as
|
||||||
|
// upper case, but sometimes not. Just add both as shortcuts — the browser
|
||||||
|
// will only ever fire one or the other.
|
||||||
|
keyHandlers[ctrlKey + "Shift-z"] = keyHandlers[ctrlKey + "Shift-Z"] = (self, event) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
self.redo();
|
self.redo();
|
||||||
};
|
};
|
||||||
|
@ -2223,11 +2230,6 @@ var Squire = class {
|
||||||
}
|
}
|
||||||
_beforeInput(event) {
|
_beforeInput(event) {
|
||||||
switch (event.inputType) {
|
switch (event.inputType) {
|
||||||
case "insertText":
|
|
||||||
if (isAndroid && event.data && event.data.includes("\n")) {
|
|
||||||
event.preventDefault();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case "insertLineBreak":
|
case "insertLineBreak":
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
this.splitBlock(true);
|
this.splitBlock(true);
|
||||||
|
|
11
dist/squire.js
vendored
11
dist/squire.js
vendored
File diff suppressed because one or more lines are too long
6
dist/squire.js.map
vendored
6
dist/squire.js.map
vendored
File diff suppressed because one or more lines are too long
11
dist/squire.mjs
vendored
11
dist/squire.mjs
vendored
File diff suppressed because one or more lines are too long
6
dist/squire.mjs.map
vendored
6
dist/squire.mjs.map
vendored
File diff suppressed because one or more lines are too long
2
dist/types/Editor.d.ts.map
vendored
2
dist/types/Editor.d.ts.map
vendored
File diff suppressed because one or more lines are too long
2
dist/types/keyboard/KeyHandlers.d.ts.map
vendored
2
dist/types/keyboard/KeyHandlers.d.ts.map
vendored
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"KeyHandlers.d.ts","sourceRoot":"","sources":["../../../source/keyboard/KeyHandlers.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAWxC,QAAA,MAAM,MAAM,SAAmB,MAAM,SAAS,aAAa,KAAG,IAiD7D,CAAC;AAIF,KAAK,UAAU,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;AAE7E,QAAA,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAoC3C,CAAC;AAyGF,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC"}
|
{"version":3,"file":"KeyHandlers.d.ts","sourceRoot":"","sources":["../../../source/keyboard/KeyHandlers.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAWxC,QAAA,MAAM,MAAM,SAAmB,MAAM,SAAS,aAAa,KAAG,IAuD7D,CAAC;AAIF,KAAK,UAAU,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;AAE7E,QAAA,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAoC3C,CAAC;AA4GF,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC"}
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "squire-rte",
|
"name": "squire-rte",
|
||||||
"version": "2.2.7",
|
"version": "2.2.8",
|
||||||
"description": "Squire is an HTML5 rich text editor, which provides powerful cross-browser normalisation, whilst being supremely lightweight and flexible.",
|
"description": "Squire is an HTML5 rich text editor, which provides powerful cross-browser normalisation, whilst being supremely lightweight and flexible.",
|
||||||
"main": "dist/squire.mjs",
|
"main": "dist/squire.mjs",
|
||||||
"types": "dist/types/Squire.d.ts",
|
"types": "dist/types/Squire.d.ts",
|
||||||
|
|
Loading…
Reference in a new issue