@ckeditor/ckeditor5-link 40.2.0 → 41.0.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/LICENSE.md +1 -1
- package/build/link.js +2 -2
- package/lang/translations/ar.po +1 -1
- package/lang/translations/ast.po +1 -1
- package/lang/translations/az.po +1 -1
- package/lang/translations/bg.po +1 -1
- package/lang/translations/bn.po +1 -1
- package/lang/translations/ca.po +1 -1
- package/lang/translations/cs.po +1 -1
- package/lang/translations/da.po +1 -1
- package/lang/translations/de-ch.po +1 -1
- package/lang/translations/de.po +1 -1
- package/lang/translations/el.po +1 -1
- package/lang/translations/en-au.po +1 -1
- package/lang/translations/en-gb.po +1 -1
- package/lang/translations/en.po +1 -1
- package/lang/translations/eo.po +1 -1
- package/lang/translations/es.po +1 -1
- package/lang/translations/et.po +1 -1
- package/lang/translations/eu.po +1 -1
- package/lang/translations/fa.po +1 -1
- package/lang/translations/fi.po +1 -1
- package/lang/translations/fr.po +1 -1
- package/lang/translations/gl.po +1 -1
- package/lang/translations/he.po +1 -1
- package/lang/translations/hi.po +1 -1
- package/lang/translations/hr.po +1 -1
- package/lang/translations/hu.po +1 -1
- package/lang/translations/hy.po +1 -1
- package/lang/translations/id.po +1 -1
- package/lang/translations/it.po +1 -1
- package/lang/translations/ja.po +1 -1
- package/lang/translations/km.po +1 -1
- package/lang/translations/kn.po +1 -1
- package/lang/translations/ko.po +1 -1
- package/lang/translations/ku.po +1 -1
- package/lang/translations/lt.po +1 -1
- package/lang/translations/lv.po +1 -1
- package/lang/translations/ms.po +1 -1
- package/lang/translations/nb.po +1 -1
- package/lang/translations/ne.po +1 -1
- package/lang/translations/nl.po +1 -1
- package/lang/translations/no.po +1 -1
- package/lang/translations/pl.po +1 -1
- package/lang/translations/pt-br.po +1 -1
- package/lang/translations/pt.po +1 -1
- package/lang/translations/ro.po +1 -1
- package/lang/translations/ru.po +1 -1
- package/lang/translations/sk.po +1 -1
- package/lang/translations/sq.po +1 -1
- package/lang/translations/sr-latn.po +1 -1
- package/lang/translations/sr.po +1 -1
- package/lang/translations/sv.po +1 -1
- package/lang/translations/th.po +1 -1
- package/lang/translations/tk.po +1 -1
- package/lang/translations/tr.po +1 -1
- package/lang/translations/tt.po +1 -1
- package/lang/translations/ug.po +1 -1
- package/lang/translations/uk.po +1 -1
- package/lang/translations/ur.po +1 -1
- package/lang/translations/uz.po +1 -1
- package/lang/translations/vi.po +1 -1
- package/lang/translations/zh-cn.po +1 -1
- package/lang/translations/zh.po +1 -1
- package/package.json +4 -3
- package/src/augmentation.d.ts +2 -2
- package/src/augmentation.js +1 -1
- package/src/autolink.d.ts +4 -4
- package/src/autolink.js +5 -5
- package/src/index.d.ts +12 -12
- package/src/index.js +11 -11
- package/src/link.d.ts +5 -5
- package/src/link.js +5 -5
- package/src/linkcommand.d.ts +5 -5
- package/src/linkcommand.js +6 -6
- package/src/linkconfig.d.ts +21 -2
- package/src/linkconfig.js +1 -1
- package/src/linkediting.d.ts +4 -4
- package/src/linkediting.js +10 -9
- package/src/linkimage.d.ts +4 -4
- package/src/linkimage.js +4 -4
- package/src/linkimageediting.d.ts +4 -4
- package/src/linkimageediting.js +6 -6
- package/src/linkimageui.d.ts +4 -4
- package/src/linkimageui.js +6 -6
- package/src/linkui.d.ts +5 -5
- package/src/linkui.js +19 -15
- package/src/ui/linkactionsview.d.ts +4 -4
- package/src/ui/linkactionsview.js +5 -5
- package/src/ui/linkformview.d.ts +4 -4
- package/src/ui/linkformview.js +4 -4
- package/src/unlinkcommand.d.ts +2 -2
- package/src/unlinkcommand.js +4 -4
- package/src/utils/automaticdecorators.d.ts +4 -4
- package/src/utils/automaticdecorators.js +2 -2
- package/src/utils/manualdecorator.d.ts +6 -6
- package/src/utils/manualdecorator.js +2 -2
- package/src/utils.d.ts +4 -4
- package/src/utils.js +1 -1
- package/theme/link.css +1 -1
- package/theme/linkactions.css +1 -1
- package/theme/linkform.css +1 -1
- package/theme/linkimage.css +1 -1
package/lang/translations/sr.po
CHANGED
package/lang/translations/sv.po
CHANGED
package/lang/translations/th.po
CHANGED
package/lang/translations/tk.po
CHANGED
package/lang/translations/tr.po
CHANGED
package/lang/translations/tt.po
CHANGED
package/lang/translations/ug.po
CHANGED
package/lang/translations/uk.po
CHANGED
package/lang/translations/ur.po
CHANGED
package/lang/translations/uz.po
CHANGED
package/lang/translations/vi.po
CHANGED
package/lang/translations/zh.po
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-link",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "41.0.0",
|
|
4
4
|
"description": "Link feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -10,10 +10,11 @@
|
|
|
10
10
|
"ckeditor5-plugin",
|
|
11
11
|
"ckeditor5-dll"
|
|
12
12
|
],
|
|
13
|
+
"type": "module",
|
|
13
14
|
"main": "src/index.js",
|
|
14
15
|
"dependencies": {
|
|
15
|
-
"@ckeditor/ckeditor5-ui": "
|
|
16
|
-
"ckeditor5": "
|
|
16
|
+
"@ckeditor/ckeditor5-ui": "41.0.0",
|
|
17
|
+
"ckeditor5": "41.0.0",
|
|
17
18
|
"lodash-es": "4.17.21"
|
|
18
19
|
},
|
|
19
20
|
"author": "CKSource (http://cksource.com/)",
|
package/src/augmentation.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import type { LinkConfig, AutoLink, Link, LinkEditing, LinkImage, LinkImageEditing, LinkImageUI, LinkUI, LinkCommand, UnlinkCommand } from './index';
|
|
5
|
+
import type { LinkConfig, AutoLink, Link, LinkEditing, LinkImage, LinkImageEditing, LinkImageUI, LinkUI, LinkCommand, UnlinkCommand } from './index.js';
|
|
6
6
|
declare module '@ckeditor/ckeditor5-core' {
|
|
7
7
|
interface EditorConfig {
|
|
8
8
|
/**
|
package/src/augmentation.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
export {};
|
package/src/autolink.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module link/autolink
|
|
7
7
|
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
-
import { Delete } from 'ckeditor5/src/typing';
|
|
10
|
-
import LinkEditing from './linkediting';
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import { Delete } from 'ckeditor5/src/typing.js';
|
|
10
|
+
import LinkEditing from './linkediting.js';
|
|
11
11
|
/**
|
|
12
12
|
* The autolink plugin.
|
|
13
13
|
*/
|
package/src/autolink.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module link/autolink
|
|
7
7
|
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
-
import { Delete, TextWatcher, getLastTextLine, findAttributeRange } from 'ckeditor5/src/typing';
|
|
10
|
-
import { addLinkProtocolIfApplicable, linkHasProtocol } from './utils';
|
|
11
|
-
import LinkEditing from './linkediting';
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import { Delete, TextWatcher, getLastTextLine, findAttributeRange } from 'ckeditor5/src/typing.js';
|
|
10
|
+
import { addLinkProtocolIfApplicable, linkHasProtocol } from './utils.js';
|
|
11
|
+
import LinkEditing from './linkediting.js';
|
|
12
12
|
const MIN_LINK_LENGTH_WITH_SPACE_AT_END = 4; // Ie: "t.co " (length 5).
|
|
13
13
|
// This was a tweak from https://gist.github.com/dperini/729294.
|
|
14
14
|
const URL_REG_EXP = new RegExp(
|
package/src/index.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module link
|
|
7
7
|
*/
|
|
8
|
-
export { default as Link } from './link';
|
|
9
|
-
export { default as LinkEditing } from './linkediting';
|
|
10
|
-
export { default as LinkUI } from './linkui';
|
|
11
|
-
export { default as LinkImage } from './linkimage';
|
|
12
|
-
export { default as LinkImageEditing } from './linkimageediting';
|
|
13
|
-
export { default as LinkImageUI } from './linkimageui';
|
|
14
|
-
export { default as AutoLink } from './autolink';
|
|
15
|
-
export { LinkConfig, type LinkDecoratorDefinition } from './linkconfig';
|
|
16
|
-
export { default as LinkCommand } from './linkcommand';
|
|
17
|
-
export { default as UnlinkCommand } from './unlinkcommand';
|
|
18
|
-
import './augmentation';
|
|
8
|
+
export { default as Link } from './link.js';
|
|
9
|
+
export { default as LinkEditing } from './linkediting.js';
|
|
10
|
+
export { default as LinkUI } from './linkui.js';
|
|
11
|
+
export { default as LinkImage } from './linkimage.js';
|
|
12
|
+
export { default as LinkImageEditing } from './linkimageediting.js';
|
|
13
|
+
export { default as LinkImageUI } from './linkimageui.js';
|
|
14
|
+
export { default as AutoLink } from './autolink.js';
|
|
15
|
+
export { LinkConfig, type LinkDecoratorDefinition } from './linkconfig.js';
|
|
16
|
+
export { default as LinkCommand } from './linkcommand.js';
|
|
17
|
+
export { default as UnlinkCommand } from './unlinkcommand.js';
|
|
18
|
+
import './augmentation.js';
|
package/src/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module link
|
|
7
7
|
*/
|
|
8
|
-
export { default as Link } from './link';
|
|
9
|
-
export { default as LinkEditing } from './linkediting';
|
|
10
|
-
export { default as LinkUI } from './linkui';
|
|
11
|
-
export { default as LinkImage } from './linkimage';
|
|
12
|
-
export { default as LinkImageEditing } from './linkimageediting';
|
|
13
|
-
export { default as LinkImageUI } from './linkimageui';
|
|
14
|
-
export { default as AutoLink } from './autolink';
|
|
15
|
-
export { default as LinkCommand } from './linkcommand';
|
|
16
|
-
export { default as UnlinkCommand } from './unlinkcommand';
|
|
17
|
-
import './augmentation';
|
|
8
|
+
export { default as Link } from './link.js';
|
|
9
|
+
export { default as LinkEditing } from './linkediting.js';
|
|
10
|
+
export { default as LinkUI } from './linkui.js';
|
|
11
|
+
export { default as LinkImage } from './linkimage.js';
|
|
12
|
+
export { default as LinkImageEditing } from './linkimageediting.js';
|
|
13
|
+
export { default as LinkImageUI } from './linkimageui.js';
|
|
14
|
+
export { default as AutoLink } from './autolink.js';
|
|
15
|
+
export { default as LinkCommand } from './linkcommand.js';
|
|
16
|
+
export { default as UnlinkCommand } from './unlinkcommand.js';
|
|
17
|
+
import './augmentation.js';
|
package/src/link.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module link/link
|
|
7
7
|
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
-
import LinkEditing from './linkediting';
|
|
10
|
-
import LinkUI from './linkui';
|
|
11
|
-
import AutoLink from './autolink';
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import LinkEditing from './linkediting.js';
|
|
10
|
+
import LinkUI from './linkui.js';
|
|
11
|
+
import AutoLink from './autolink.js';
|
|
12
12
|
/**
|
|
13
13
|
* The link plugin.
|
|
14
14
|
*
|
package/src/link.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module link/link
|
|
7
7
|
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
-
import LinkEditing from './linkediting';
|
|
10
|
-
import LinkUI from './linkui';
|
|
11
|
-
import AutoLink from './autolink';
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import LinkEditing from './linkediting.js';
|
|
10
|
+
import LinkUI from './linkui.js';
|
|
11
|
+
import AutoLink from './autolink.js';
|
|
12
12
|
/**
|
|
13
13
|
* The link plugin.
|
|
14
14
|
*
|
package/src/linkcommand.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module link/linkcommand
|
|
7
7
|
*/
|
|
8
|
-
import { Command } from 'ckeditor5/src/core';
|
|
9
|
-
import { Collection } from 'ckeditor5/src/utils';
|
|
10
|
-
import AutomaticDecorators from './utils/automaticdecorators';
|
|
11
|
-
import type ManualDecorator from './utils/manualdecorator';
|
|
8
|
+
import { Command } from 'ckeditor5/src/core.js';
|
|
9
|
+
import { Collection } from 'ckeditor5/src/utils.js';
|
|
10
|
+
import AutomaticDecorators from './utils/automaticdecorators.js';
|
|
11
|
+
import type ManualDecorator from './utils/manualdecorator.js';
|
|
12
12
|
/**
|
|
13
13
|
* The link command. It is used by the {@link module:link/link~Link link feature}.
|
|
14
14
|
*/
|
package/src/linkcommand.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module link/linkcommand
|
|
7
7
|
*/
|
|
8
|
-
import { Command } from 'ckeditor5/src/core';
|
|
9
|
-
import { findAttributeRange } from 'ckeditor5/src/typing';
|
|
10
|
-
import { Collection, first, toMap } from 'ckeditor5/src/utils';
|
|
11
|
-
import AutomaticDecorators from './utils/automaticdecorators';
|
|
12
|
-
import { isLinkableElement } from './utils';
|
|
8
|
+
import { Command } from 'ckeditor5/src/core.js';
|
|
9
|
+
import { findAttributeRange } from 'ckeditor5/src/typing.js';
|
|
10
|
+
import { Collection, first, toMap } from 'ckeditor5/src/utils.js';
|
|
11
|
+
import AutomaticDecorators from './utils/automaticdecorators.js';
|
|
12
|
+
import { isLinkableElement } from './utils.js';
|
|
13
13
|
/**
|
|
14
14
|
* The link command. It is used by the {@link module:link/link~Link link feature}.
|
|
15
15
|
*/
|
package/src/linkconfig.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module link/linkconfig
|
|
7
7
|
*/
|
|
8
|
-
import type { ArrayOrItem } from 'ckeditor5/src/utils';
|
|
8
|
+
import type { ArrayOrItem } from 'ckeditor5/src/utils.js';
|
|
9
9
|
/**
|
|
10
10
|
* The configuration of the {@link module:link/link~Link link feature}.
|
|
11
11
|
*
|
|
@@ -43,6 +43,25 @@ export interface LinkConfig {
|
|
|
43
43
|
* **NOTE:** If no configuration is provided, the editor will not auto-fix the links.
|
|
44
44
|
*/
|
|
45
45
|
defaultProtocol?: string;
|
|
46
|
+
/**
|
|
47
|
+
* When set to `true`, the form will accept an empty value in the URL field, creating a link with an empty `href` (`<a href="">`).
|
|
48
|
+
*
|
|
49
|
+
* ```ts
|
|
50
|
+
* ClassicEditor
|
|
51
|
+
* .create( editorElement, {
|
|
52
|
+
* link: {
|
|
53
|
+
* allowCreatingEmptyLinks: true
|
|
54
|
+
* }
|
|
55
|
+
* } )
|
|
56
|
+
* .then( ... )
|
|
57
|
+
* .catch( ... );
|
|
58
|
+
* ```
|
|
59
|
+
*
|
|
60
|
+
* **NOTE:** This option only adds form validation. If a link with an empty `href` is loaded into the editor, it will be left as-is.
|
|
61
|
+
*
|
|
62
|
+
* @default false
|
|
63
|
+
*/
|
|
64
|
+
allowCreatingEmptyLinks?: boolean;
|
|
46
65
|
/**
|
|
47
66
|
* When set to `true`, the `target="blank"` and `rel="noopener noreferrer"` attributes are automatically added to all external links
|
|
48
67
|
* in the editor. "External links" are all links in the editor content starting with `http`, `https`, or `//`.
|
package/src/linkconfig.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
export {};
|
package/src/linkediting.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module link/linkediting
|
|
7
7
|
*/
|
|
8
|
-
import { Plugin, type Editor } from 'ckeditor5/src/core';
|
|
9
|
-
import { Input, TwoStepCaretMovement } from 'ckeditor5/src/typing';
|
|
10
|
-
import { ClipboardPipeline } from 'ckeditor5/src/clipboard';
|
|
8
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
9
|
+
import { Input, TwoStepCaretMovement } from 'ckeditor5/src/typing.js';
|
|
10
|
+
import { ClipboardPipeline } from 'ckeditor5/src/clipboard.js';
|
|
11
11
|
import '../theme/link.css';
|
|
12
12
|
/**
|
|
13
13
|
* The link engine feature.
|
package/src/linkediting.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module link/linkediting
|
|
7
7
|
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
-
import { Input, TwoStepCaretMovement, inlineHighlight } from 'ckeditor5/src/typing';
|
|
10
|
-
import { ClipboardPipeline } from 'ckeditor5/src/clipboard';
|
|
11
|
-
import { keyCodes, env } from 'ckeditor5/src/utils';
|
|
12
|
-
import LinkCommand from './linkcommand';
|
|
13
|
-
import UnlinkCommand from './unlinkcommand';
|
|
14
|
-
import ManualDecorator from './utils/manualdecorator';
|
|
15
|
-
import { createLinkElement, ensureSafeUrl, getLocalizedDecorators, normalizeDecorators, openLink, addLinkProtocolIfApplicable } from './utils';
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import { Input, TwoStepCaretMovement, inlineHighlight } from 'ckeditor5/src/typing.js';
|
|
10
|
+
import { ClipboardPipeline } from 'ckeditor5/src/clipboard.js';
|
|
11
|
+
import { keyCodes, env } from 'ckeditor5/src/utils.js';
|
|
12
|
+
import LinkCommand from './linkcommand.js';
|
|
13
|
+
import UnlinkCommand from './unlinkcommand.js';
|
|
14
|
+
import ManualDecorator from './utils/manualdecorator.js';
|
|
15
|
+
import { createLinkElement, ensureSafeUrl, getLocalizedDecorators, normalizeDecorators, openLink, addLinkProtocolIfApplicable } from './utils.js';
|
|
16
16
|
import '../theme/link.css';
|
|
17
17
|
const HIGHLIGHT_CLASS = 'ck-link_selected';
|
|
18
18
|
const DECORATOR_AUTOMATIC = 'automatic';
|
|
@@ -44,6 +44,7 @@ export default class LinkEditing extends Plugin {
|
|
|
44
44
|
constructor(editor) {
|
|
45
45
|
super(editor);
|
|
46
46
|
editor.config.define('link', {
|
|
47
|
+
allowCreatingEmptyLinks: false,
|
|
47
48
|
addTargetToExternalLinks: false
|
|
48
49
|
});
|
|
49
50
|
}
|
package/src/linkimage.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module link/linkimage
|
|
7
7
|
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
-
import LinkImageEditing from './linkimageediting';
|
|
10
|
-
import LinkImageUI from './linkimageui';
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import LinkImageEditing from './linkimageediting.js';
|
|
10
|
+
import LinkImageUI from './linkimageui.js';
|
|
11
11
|
import '../theme/linkimage.css';
|
|
12
12
|
/**
|
|
13
13
|
* The `LinkImage` plugin.
|
package/src/linkimage.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module link/linkimage
|
|
7
7
|
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
-
import LinkImageEditing from './linkimageediting';
|
|
10
|
-
import LinkImageUI from './linkimageui';
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import LinkImageEditing from './linkimageediting.js';
|
|
10
|
+
import LinkImageUI from './linkimageui.js';
|
|
11
11
|
import '../theme/linkimage.css';
|
|
12
12
|
/**
|
|
13
13
|
* The `LinkImage` plugin.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module link/linkimageediting
|
|
7
7
|
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
-
import LinkEditing from './linkediting';
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import LinkEditing from './linkediting.js';
|
|
10
10
|
/**
|
|
11
11
|
* The link image engine feature.
|
|
12
12
|
*
|
|
@@ -25,7 +25,7 @@ export default class LinkImageEditing extends Plugin {
|
|
|
25
25
|
/**
|
|
26
26
|
* @inheritDoc
|
|
27
27
|
*/
|
|
28
|
-
|
|
28
|
+
afterInit(): void;
|
|
29
29
|
/**
|
|
30
30
|
* Processes {@link module:link/linkconfig~LinkDecoratorAutomaticDefinition automatic decorators} definitions and
|
|
31
31
|
* attaches proper converters that will work when linking an image.`
|
package/src/linkimageediting.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module link/linkimageediting
|
|
7
7
|
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
-
import { Matcher } from 'ckeditor5/src/engine';
|
|
10
|
-
import { toMap } from 'ckeditor5/src/utils';
|
|
11
|
-
import LinkEditing from './linkediting';
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import { Matcher } from 'ckeditor5/src/engine.js';
|
|
10
|
+
import { toMap } from 'ckeditor5/src/utils.js';
|
|
11
|
+
import LinkEditing from './linkediting.js';
|
|
12
12
|
/**
|
|
13
13
|
* The link image engine feature.
|
|
14
14
|
*
|
|
@@ -31,7 +31,7 @@ export default class LinkImageEditing extends Plugin {
|
|
|
31
31
|
/**
|
|
32
32
|
* @inheritDoc
|
|
33
33
|
*/
|
|
34
|
-
|
|
34
|
+
afterInit() {
|
|
35
35
|
const editor = this.editor;
|
|
36
36
|
const schema = editor.model.schema;
|
|
37
37
|
if (editor.plugins.has('ImageBlockEditing')) {
|
package/src/linkimageui.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import { Plugin } from 'ckeditor5/src/core';
|
|
6
|
-
import LinkUI from './linkui';
|
|
7
|
-
import LinkEditing from './linkediting';
|
|
5
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
6
|
+
import LinkUI from './linkui.js';
|
|
7
|
+
import LinkEditing from './linkediting.js';
|
|
8
8
|
/**
|
|
9
9
|
* The link image UI plugin.
|
|
10
10
|
*
|
package/src/linkimageui.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module link/linkimageui
|
|
7
7
|
*/
|
|
8
|
-
import { ButtonView } from 'ckeditor5/src/ui';
|
|
9
|
-
import { Plugin } from 'ckeditor5/src/core';
|
|
10
|
-
import LinkUI from './linkui';
|
|
11
|
-
import LinkEditing from './linkediting';
|
|
12
|
-
import { LINK_KEYSTROKE } from './utils';
|
|
8
|
+
import { ButtonView } from 'ckeditor5/src/ui.js';
|
|
9
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
10
|
+
import LinkUI from './linkui.js';
|
|
11
|
+
import LinkEditing from './linkediting.js';
|
|
12
|
+
import { LINK_KEYSTROKE } from './utils.js';
|
|
13
13
|
import linkIcon from '../theme/icons/link.svg';
|
|
14
14
|
/**
|
|
15
15
|
* The link image UI plugin.
|
package/src/linkui.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module link/linkui
|
|
7
7
|
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
-
import { ContextualBalloon, type ViewWithCssTransitionDisabler } from 'ckeditor5/src/ui';
|
|
10
|
-
import LinkFormView from './ui/linkformview';
|
|
11
|
-
import LinkActionsView from './ui/linkactionsview';
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import { ContextualBalloon, type ViewWithCssTransitionDisabler } from 'ckeditor5/src/ui.js';
|
|
10
|
+
import LinkFormView from './ui/linkformview.js';
|
|
11
|
+
import LinkActionsView from './ui/linkactionsview.js';
|
|
12
12
|
/**
|
|
13
13
|
* The link UI plugin. It introduces the `'link'` and `'unlink'` buttons and support for the <kbd>Ctrl+K</kbd> keystroke.
|
|
14
14
|
*
|