@lesjoursfr/edith 0.1.5 → 0.1.6
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 +8 -8
- package/src/ui/editor.js +4 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lesjoursfr/edith",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Simple WYSIWYG editor.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "lesjoursfr/edith",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"editor"
|
|
46
46
|
],
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@babel/core": "^7.19.
|
|
49
|
-
"@babel/preset-env": "^7.19.
|
|
48
|
+
"@babel/core": "^7.19.1",
|
|
49
|
+
"@babel/preset-env": "^7.19.1",
|
|
50
50
|
"@codemirror/lang-html": "^6.1.1",
|
|
51
51
|
"@fortawesome/fontawesome-free": "^6.2.0",
|
|
52
52
|
"@popperjs/core": "^2.11.6",
|
|
@@ -54,25 +54,25 @@
|
|
|
54
54
|
"babel-loader": "^8.2.5",
|
|
55
55
|
"codemirror": "^6.0.1",
|
|
56
56
|
"css-loader": "^6.7.1",
|
|
57
|
-
"eslint": "^8.23.
|
|
57
|
+
"eslint": "^8.23.1",
|
|
58
58
|
"eslint-config-prettier": "^8.5.0",
|
|
59
59
|
"eslint-config-standard": "^17.0.0",
|
|
60
60
|
"eslint-plugin-import": "^2.26.0",
|
|
61
|
-
"eslint-plugin-n": "^15.
|
|
61
|
+
"eslint-plugin-n": "^15.3.0",
|
|
62
62
|
"eslint-plugin-promise": "^6.0.1",
|
|
63
63
|
"jsdom": "^20.0.0",
|
|
64
64
|
"mini-css-extract-plugin": "^2.6.1",
|
|
65
65
|
"postcss": "^8.4.16",
|
|
66
66
|
"prettier": "^2.7.1",
|
|
67
|
-
"sass": "^1.
|
|
67
|
+
"sass": "^1.55.0",
|
|
68
68
|
"sass-loader": "^13.0.2",
|
|
69
69
|
"style-loader": "^3.3.1",
|
|
70
|
-
"stylelint": "^14.
|
|
70
|
+
"stylelint": "^14.12.1",
|
|
71
71
|
"stylelint-config-prettier": "^9.0.3",
|
|
72
72
|
"stylelint-config-sass-guidelines": "^9.0.1",
|
|
73
73
|
"webpack": "^5.74.0",
|
|
74
74
|
"webpack-cli": "^4.10.0",
|
|
75
|
-
"webpack-dev-server": "^4.
|
|
75
|
+
"webpack-dev-server": "^4.11.1"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
78
|
"@codemirror/lang-html": "^6.1.1",
|
package/src/ui/editor.js
CHANGED
|
@@ -317,15 +317,15 @@ EdithEditor.prototype.onPasteEvent = function (e) {
|
|
|
317
317
|
// Detect style blocs in parents
|
|
318
318
|
let dest = sel.anchorNode;
|
|
319
319
|
const style = { B: false, I: false, U: false, S: false, Q: false };
|
|
320
|
-
while (!hasClass(dest
|
|
321
|
-
// Get the parent
|
|
322
|
-
dest = dest.parentNode;
|
|
323
|
-
|
|
320
|
+
while (dest !== null && !hasClass(dest, "edith-visual")) {
|
|
324
321
|
// Check if it's a style tag
|
|
325
322
|
if (hasTagName(dest, ["b", "i", "u", "s", "q"])) {
|
|
326
323
|
// Update the style
|
|
327
324
|
style[dest.tagName] = true;
|
|
328
325
|
}
|
|
326
|
+
|
|
327
|
+
// Get the parent
|
|
328
|
+
dest = dest.parentNode;
|
|
329
329
|
}
|
|
330
330
|
|
|
331
331
|
// We have HTML content
|