@ckeditor/ckeditor5-typing 38.0.1 → 38.1.0
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 +4 -30
- package/src/delete.d.ts +1 -1
- package/src/input.d.ts +1 -1
- package/src/texttransformation.d.ts +1 -1
- package/src/twostepcaretmovement.d.ts +1 -1
- package/src/typing.d.ts +1 -1
- package/src/utils/getlasttextline.js +4 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-typing",
|
|
3
|
-
"version": "38.0
|
|
3
|
+
"version": "38.1.0",
|
|
4
4
|
"description": "Typing feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -12,33 +12,11 @@
|
|
|
12
12
|
],
|
|
13
13
|
"main": "src/index.js",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@ckeditor/ckeditor5-core": "
|
|
16
|
-
"@ckeditor/ckeditor5-engine": "
|
|
17
|
-
"@ckeditor/ckeditor5-utils": "
|
|
15
|
+
"@ckeditor/ckeditor5-core": "38.1.0",
|
|
16
|
+
"@ckeditor/ckeditor5-engine": "38.1.0",
|
|
17
|
+
"@ckeditor/ckeditor5-utils": "38.1.0",
|
|
18
18
|
"lodash-es": "^4.17.15"
|
|
19
19
|
},
|
|
20
|
-
"devDependencies": {
|
|
21
|
-
"@ckeditor/ckeditor5-autoformat": "^38.0.1",
|
|
22
|
-
"@ckeditor/ckeditor5-basic-styles": "^38.0.1",
|
|
23
|
-
"@ckeditor/ckeditor5-block-quote": "^38.0.1",
|
|
24
|
-
"@ckeditor/ckeditor5-code-block": "^38.0.1",
|
|
25
|
-
"@ckeditor/ckeditor5-editor-classic": "^38.0.1",
|
|
26
|
-
"@ckeditor/ckeditor5-enter": "^38.0.1",
|
|
27
|
-
"@ckeditor/ckeditor5-essentials": "^38.0.1",
|
|
28
|
-
"@ckeditor/ckeditor5-heading": "^38.0.1",
|
|
29
|
-
"@ckeditor/ckeditor5-image": "^38.0.1",
|
|
30
|
-
"@ckeditor/ckeditor5-indent": "^38.0.1",
|
|
31
|
-
"@ckeditor/ckeditor5-link": "^38.0.1",
|
|
32
|
-
"@ckeditor/ckeditor5-list": "^38.0.1",
|
|
33
|
-
"@ckeditor/ckeditor5-media-embed": "^38.0.1",
|
|
34
|
-
"@ckeditor/ckeditor5-mention": "^38.0.1",
|
|
35
|
-
"@ckeditor/ckeditor5-paragraph": "^38.0.1",
|
|
36
|
-
"@ckeditor/ckeditor5-table": "^38.0.1",
|
|
37
|
-
"@ckeditor/ckeditor5-undo": "^38.0.1",
|
|
38
|
-
"typescript": "^4.8.4",
|
|
39
|
-
"webpack": "^5.58.1",
|
|
40
|
-
"webpack-cli": "^4.9.0"
|
|
41
|
-
},
|
|
42
20
|
"engines": {
|
|
43
21
|
"node": ">=16.0.0",
|
|
44
22
|
"npm": ">=5.7.1"
|
|
@@ -60,9 +38,5 @@
|
|
|
60
38
|
"ckeditor5-metadata.json",
|
|
61
39
|
"CHANGELOG.md"
|
|
62
40
|
],
|
|
63
|
-
"scripts": {
|
|
64
|
-
"build": "tsc -p ./tsconfig.json",
|
|
65
|
-
"postversion": "npm run build"
|
|
66
|
-
},
|
|
67
41
|
"types": "src/index.d.ts"
|
|
68
42
|
}
|
package/src/delete.d.ts
CHANGED
package/src/input.d.ts
CHANGED
package/src/typing.d.ts
CHANGED
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
*/
|
|
32
32
|
export default function getLastTextLine(range, model) {
|
|
33
33
|
let start = range.start;
|
|
34
|
-
const text = Array.from(range.
|
|
34
|
+
const text = Array.from(range.getWalker({ ignoreElementEnd: false })).reduce((rangeText, { item }) => {
|
|
35
35
|
// Trim text to a last occurrence of an inline element and update range start.
|
|
36
|
-
if (!(
|
|
37
|
-
start = model.createPositionAfter(
|
|
36
|
+
if (!(item.is('$text') || item.is('$textProxy'))) {
|
|
37
|
+
start = model.createPositionAfter(item);
|
|
38
38
|
return '';
|
|
39
39
|
}
|
|
40
|
-
return rangeText +
|
|
40
|
+
return rangeText + item.data;
|
|
41
41
|
}, '');
|
|
42
42
|
return { text, range: model.createRange(start, range.end) };
|
|
43
43
|
}
|