action_text-trix 2.1.16 → 2.1.18
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.
- checksums.yaml +4 -4
- data/app/assets/javascripts/trix.js +29 -9
- data/lib/action_text/trix/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8776552325ed3fcb01ae96e5cb5dcac95755620f720c6c383ad26e1a6b20a018
|
|
4
|
+
data.tar.gz: 2d45cc5c5dc394fa82da1256ccf26089c3e6821518de9aab1f7c10fec65601c1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 406a323a8998c2770be0d1b0a5b35997d33f76229588413b089029e17b8134bcc2294b3da89e15b23e50a91b3eddbeaa34075aa60c23bb528dc5664af7d9965f
|
|
7
|
+
data.tar.gz: 6280f7fe260b6a0c4ff3421d9d9a30b2c717fec4a76829ae292282d9dbb73f45ebdfbafb5874b9ce8f3447fcbfe3d75ce52062d08e1d7990ff86b955fe5c93e0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Trix 2.1.
|
|
3
|
-
Copyright ©
|
|
2
|
+
Trix 2.1.18
|
|
3
|
+
Copyright © 2026 37signals, LLC
|
|
4
4
|
*/
|
|
5
5
|
(function (global, factory) {
|
|
6
6
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -9,7 +9,7 @@ Copyright © 2025 37signals, LLC
|
|
|
9
9
|
})(this, (function () { 'use strict';
|
|
10
10
|
|
|
11
11
|
var name = "trix";
|
|
12
|
-
var version = "2.1.
|
|
12
|
+
var version = "2.1.18";
|
|
13
13
|
var description = "A rich text editor for everyday writing";
|
|
14
14
|
var main = "dist/trix.umd.min.js";
|
|
15
15
|
var module = "dist/trix.esm.min.js";
|
|
@@ -43,22 +43,22 @@ Copyright © 2025 37signals, LLC
|
|
|
43
43
|
"@rollup/plugin-json": "^4.1.0",
|
|
44
44
|
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
45
45
|
"@web/dev-server": "^0.1.34",
|
|
46
|
+
"@web/test-runner": "^0.20.2",
|
|
47
|
+
"@web/test-runner-playwright": "^0.11.1",
|
|
48
|
+
"@web/test-runner-webdriver": "^0.9.0",
|
|
46
49
|
"babel-eslint": "^10.1.0",
|
|
47
50
|
chokidar: "^4.0.2",
|
|
48
51
|
concurrently: "^7.4.0",
|
|
49
52
|
eslint: "^7.32.0",
|
|
50
53
|
esm: "^3.2.25",
|
|
51
54
|
idiomorph: "^0.7.3",
|
|
52
|
-
karma: "6.4.1",
|
|
53
|
-
"karma-chrome-launcher": "3.2.0",
|
|
54
|
-
"karma-qunit": "^4.1.2",
|
|
55
|
-
"karma-sauce-launcher": "^4.3.6",
|
|
56
55
|
qunit: "2.19.1",
|
|
57
56
|
rangy: "^1.3.0",
|
|
58
57
|
rollup: "^2.56.3",
|
|
59
58
|
"rollup-plugin-includepaths": "^0.2.4",
|
|
60
59
|
"rollup-plugin-terser": "^7.0.2",
|
|
61
60
|
sass: "^1.83.0",
|
|
61
|
+
"source-map": "^0.7.6",
|
|
62
62
|
svgo: "^2.8.0",
|
|
63
63
|
webdriverio: "^7.19.5"
|
|
64
64
|
};
|
|
@@ -74,7 +74,8 @@ Copyright © 2025 37signals, LLC
|
|
|
74
74
|
watch: "rollup -c -w",
|
|
75
75
|
lint: "eslint .",
|
|
76
76
|
pretest: "yarn run lint && yarn run build",
|
|
77
|
-
test: "
|
|
77
|
+
test: "web-test-runner",
|
|
78
|
+
"test:watch": "web-test-runner --watch",
|
|
78
79
|
version: "yarn build && git add action_text-trix",
|
|
79
80
|
prerelease: "yarn version && yarn test",
|
|
80
81
|
"release-npm": "npm adduser && npm publish",
|
|
@@ -3117,6 +3118,10 @@ $\
|
|
|
3117
3118
|
var purify = createDOMPurify();
|
|
3118
3119
|
|
|
3119
3120
|
purify.addHook("uponSanitizeAttribute", function (node, data) {
|
|
3121
|
+
if (data.attrName === "data-trix-serialized-attributes") {
|
|
3122
|
+
data.keepAttr = false;
|
|
3123
|
+
return;
|
|
3124
|
+
}
|
|
3120
3125
|
const allowedAttributePattern = /^data-trix-/;
|
|
3121
3126
|
if (allowedAttributePattern.test(data.attrName)) {
|
|
3122
3127
|
data.forceKeepAttr = true;
|
|
@@ -6857,7 +6862,13 @@ $\
|
|
|
6857
6862
|
|
|
6858
6863
|
class StringPiece extends Piece {
|
|
6859
6864
|
static fromJSON(pieceJSON) {
|
|
6860
|
-
|
|
6865
|
+
const attributes = {
|
|
6866
|
+
...pieceJSON.attributes
|
|
6867
|
+
};
|
|
6868
|
+
if (attributes.href && !purify.isValidAttribute("a", "href", attributes.href)) {
|
|
6869
|
+
delete attributes.href;
|
|
6870
|
+
}
|
|
6871
|
+
return new this(pieceJSON.string, attributes);
|
|
6861
6872
|
}
|
|
6862
6873
|
constructor(string) {
|
|
6863
6874
|
super(...arguments);
|
|
@@ -10043,6 +10054,15 @@ $\
|
|
|
10043
10054
|
} else {
|
|
10044
10055
|
if (node.parentNode === container) {
|
|
10045
10056
|
if (childIndex++ === offset) {
|
|
10057
|
+
if (!strict && nodeIsBlockStart(node, {
|
|
10058
|
+
strict
|
|
10059
|
+
})) {
|
|
10060
|
+
if (foundBlock) {
|
|
10061
|
+
location.index++;
|
|
10062
|
+
}
|
|
10063
|
+
location.offset = 0;
|
|
10064
|
+
foundBlock = true;
|
|
10065
|
+
}
|
|
10046
10066
|
break;
|
|
10047
10067
|
}
|
|
10048
10068
|
} else if (!elementContainsNode(container, node)) {
|