@ckeditor/ckeditor5-link 40.0.0 → 40.2.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/CHANGELOG.md +29 -29
- package/LICENSE.md +3 -3
- package/build/link.js +1 -1
- package/build/translations/ug.js +1 -1
- package/lang/translations/ug.po +6 -6
- package/package.json +3 -3
- package/src/augmentation.d.ts +30 -30
- package/src/augmentation.js +5 -5
- package/src/autolink.d.ts +75 -60
- package/src/autolink.js +284 -216
- package/src/index.d.ts +18 -18
- package/src/index.js +17 -17
- package/src/link.d.ts +27 -27
- package/src/link.js +31 -31
- package/src/linkcommand.d.ts +132 -132
- package/src/linkcommand.js +285 -285
- package/src/linkconfig.d.ts +251 -251
- package/src/linkconfig.js +5 -5
- package/src/linkediting.d.ts +70 -106
- package/src/linkediting.js +278 -547
- package/src/linkimage.d.ts +27 -27
- package/src/linkimage.js +31 -31
- package/src/linkimageediting.d.ts +39 -39
- package/src/linkimageediting.js +245 -245
- package/src/linkimageui.d.ts +40 -40
- package/src/linkimageui.js +96 -96
- package/src/linkui.d.ts +165 -165
- package/src/linkui.js +581 -581
- package/src/ui/linkactionsview.d.ts +101 -101
- package/src/ui/linkactionsview.js +156 -156
- package/src/ui/linkformview.d.ts +141 -141
- package/src/ui/linkformview.js +232 -232
- package/src/unlinkcommand.d.ts +31 -31
- package/src/unlinkcommand.js +66 -66
- package/src/utils/automaticdecorators.d.ts +45 -45
- package/src/utils/automaticdecorators.js +140 -140
- package/src/utils/manualdecorator.d.ts +72 -72
- package/src/utils/manualdecorator.js +47 -47
- package/src/utils.d.ts +80 -80
- package/src/utils.js +128 -128
- package/build/link.js.map +0 -1
package/src/augmentation.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
export {};
|
package/src/autolink.d.ts
CHANGED
|
@@ -1,60 +1,75 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @module link/autolink
|
|
7
|
-
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
-
import { Delete } from 'ckeditor5/src/typing';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
*
|
|
51
|
-
*/
|
|
52
|
-
private
|
|
53
|
-
/**
|
|
54
|
-
*
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module link/autolink
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
+
import { Delete } from 'ckeditor5/src/typing';
|
|
10
|
+
import LinkEditing from './linkediting';
|
|
11
|
+
/**
|
|
12
|
+
* The autolink plugin.
|
|
13
|
+
*/
|
|
14
|
+
export default class AutoLink extends Plugin {
|
|
15
|
+
/**
|
|
16
|
+
* @inheritDoc
|
|
17
|
+
*/
|
|
18
|
+
static get requires(): readonly [typeof Delete, typeof LinkEditing];
|
|
19
|
+
/**
|
|
20
|
+
* @inheritDoc
|
|
21
|
+
*/
|
|
22
|
+
static get pluginName(): "AutoLink";
|
|
23
|
+
/**
|
|
24
|
+
* @inheritDoc
|
|
25
|
+
*/
|
|
26
|
+
init(): void;
|
|
27
|
+
/**
|
|
28
|
+
* @inheritDoc
|
|
29
|
+
*/
|
|
30
|
+
afterInit(): void;
|
|
31
|
+
/**
|
|
32
|
+
* For given position, returns a range that includes the whole link that contains the position.
|
|
33
|
+
*
|
|
34
|
+
* If position is not inside a link, returns `null`.
|
|
35
|
+
*/
|
|
36
|
+
private _expandLinkRange;
|
|
37
|
+
/**
|
|
38
|
+
* Extends the document selection to includes all links that intersects with given `selectedRange`.
|
|
39
|
+
*/
|
|
40
|
+
private _selectEntireLinks;
|
|
41
|
+
/**
|
|
42
|
+
* Enables autolinking on pasting a URL when some content is selected.
|
|
43
|
+
*/
|
|
44
|
+
private _enablePasteLinking;
|
|
45
|
+
/**
|
|
46
|
+
* Enables autolinking on typing.
|
|
47
|
+
*/
|
|
48
|
+
private _enableTypingHandling;
|
|
49
|
+
/**
|
|
50
|
+
* Enables autolinking on the <kbd>Enter</kbd> key.
|
|
51
|
+
*/
|
|
52
|
+
private _enableEnterHandling;
|
|
53
|
+
/**
|
|
54
|
+
* Enables autolinking on the <kbd>Shift</kbd>+<kbd>Enter</kbd> keyboard shortcut.
|
|
55
|
+
*/
|
|
56
|
+
private _enableShiftEnterHandling;
|
|
57
|
+
/**
|
|
58
|
+
* Checks if the passed range contains a linkable text.
|
|
59
|
+
*/
|
|
60
|
+
private _checkAndApplyAutoLinkOnRange;
|
|
61
|
+
/**
|
|
62
|
+
* Applies a link on a given range if the link should be applied.
|
|
63
|
+
*
|
|
64
|
+
* @param url The URL to link.
|
|
65
|
+
* @param range The text range to apply the link attribute to.
|
|
66
|
+
*/
|
|
67
|
+
private _applyAutoLink;
|
|
68
|
+
/**
|
|
69
|
+
* Enqueues autolink changes in the model.
|
|
70
|
+
*
|
|
71
|
+
* @param url The URL to link.
|
|
72
|
+
* @param range The text range to apply the link attribute to.
|
|
73
|
+
*/
|
|
74
|
+
private _persistAutoLink;
|
|
75
|
+
}
|