@ckeditor/ckeditor5-link 42.0.2 → 43.0.0-alpha.1
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 +1 -310
- package/build/link.js +1 -1
- package/build/translations/sr-latn.js +1 -1
- package/dist/index.js +17 -10
- package/dist/index.js.map +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/lang/translations/sr-latn.po +3 -3
- package/package.json +9 -9
- package/src/linkui.js +16 -9
|
@@ -2,4 +2,4 @@
|
|
|
2
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
|
-
export default {"sr-latn":{"dictionary":{"Unlink":"Оtkloni link","Link":"Link","Link URL":"URL link","Link URL must not be empty.":"","Link image":"Link slike","Edit link":"Ispravi link","Open link in new tab":"Otvori link u novom prozoru","This link has no URL":"Link ne sadrži URL","Open in a new tab":"Otvori u novoj kartici","Downloadable":"Moguće preuzimanje","Create link":"","Move out of a link":""},getPluralForm(n){return (n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);}}}
|
|
5
|
+
export default {"sr-latn":{"dictionary":{"Unlink":"Оtkloni link","Link":"Link","Link URL":"URL link","Link URL must not be empty.":"URL linka ne sme biti prazan.","Link image":"Link slike","Edit link":"Ispravi link","Open link in new tab":"Otvori link u novom prozoru","This link has no URL":"Link ne sadrži URL","Open in a new tab":"Otvori u novoj kartici","Downloadable":"Moguće preuzimanje","Create link":"Kreirajte vezu","Move out of a link":"Pomerite se sa veze"},getPluralForm(n){return (n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);}}}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
( e => {
|
|
7
|
-
const { [ 'sr-latn' ]: { dictionary, getPluralForm } } = {"sr-latn":{"dictionary":{"Unlink":"Оtkloni link","Link":"Link","Link URL":"URL link","Link URL must not be empty.":"","Link image":"Link slike","Edit link":"Ispravi link","Open link in new tab":"Otvori link u novom prozoru","This link has no URL":"Link ne sadrži URL","Open in a new tab":"Otvori u novoj kartici","Downloadable":"Moguće preuzimanje","Create link":"","Move out of a link":""},getPluralForm(n){return (n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);}}};
|
|
7
|
+
const { [ 'sr-latn' ]: { dictionary, getPluralForm } } = {"sr-latn":{"dictionary":{"Unlink":"Оtkloni link","Link":"Link","Link URL":"URL link","Link URL must not be empty.":"URL linka ne sme biti prazan.","Link image":"Link slike","Edit link":"Ispravi link","Open link in new tab":"Otvori link u novom prozoru","This link has no URL":"Link ne sadrži URL","Open in a new tab":"Otvori u novoj kartici","Downloadable":"Moguće preuzimanje","Create link":"Kreirajte vezu","Move out of a link":"Pomerite se sa veze"},getPluralForm(n){return (n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);}}};
|
|
8
8
|
e[ 'sr-latn' ] ||= { dictionary: {}, getPluralForm: null };
|
|
9
9
|
e[ 'sr-latn' ].dictionary = Object.assign( e[ 'sr-latn' ].dictionary, dictionary );
|
|
10
10
|
e[ 'sr-latn' ].getPluralForm = getPluralForm;
|
|
@@ -31,7 +31,7 @@ msgstr "URL link"
|
|
|
31
31
|
|
|
32
32
|
msgctxt "An error text displayed when user attempted to enter an empty URL."
|
|
33
33
|
msgid "Link URL must not be empty."
|
|
34
|
-
msgstr ""
|
|
34
|
+
msgstr "URL linka ne sme biti prazan."
|
|
35
35
|
|
|
36
36
|
msgctxt "Label for the image link button."
|
|
37
37
|
msgid "Link image"
|
|
@@ -59,8 +59,8 @@ msgstr "Moguće preuzimanje"
|
|
|
59
59
|
|
|
60
60
|
msgctxt "Keystroke description for assistive technologies: keystroke for creating a link."
|
|
61
61
|
msgid "Create link"
|
|
62
|
-
msgstr ""
|
|
62
|
+
msgstr "Kreirajte vezu"
|
|
63
63
|
|
|
64
64
|
msgctxt "Keystroke description for assistive technologies: keystroke for moving out of a link."
|
|
65
65
|
msgid "Move out of a link"
|
|
66
|
-
msgstr ""
|
|
66
|
+
msgstr "Pomerite se sa veze"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-link",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "43.0.0-alpha.1",
|
|
4
4
|
"description": "Link feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
"type": "module",
|
|
14
14
|
"main": "src/index.js",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@ckeditor/ckeditor5-clipboard": "
|
|
17
|
-
"@ckeditor/ckeditor5-core": "
|
|
18
|
-
"@ckeditor/ckeditor5-engine": "
|
|
19
|
-
"@ckeditor/ckeditor5-typing": "
|
|
20
|
-
"@ckeditor/ckeditor5-ui": "
|
|
21
|
-
"@ckeditor/ckeditor5-utils": "
|
|
22
|
-
"@ckeditor/ckeditor5-widget": "
|
|
23
|
-
"ckeditor5": "
|
|
16
|
+
"@ckeditor/ckeditor5-clipboard": "43.0.0-alpha.1",
|
|
17
|
+
"@ckeditor/ckeditor5-core": "43.0.0-alpha.1",
|
|
18
|
+
"@ckeditor/ckeditor5-engine": "43.0.0-alpha.1",
|
|
19
|
+
"@ckeditor/ckeditor5-typing": "43.0.0-alpha.1",
|
|
20
|
+
"@ckeditor/ckeditor5-ui": "43.0.0-alpha.1",
|
|
21
|
+
"@ckeditor/ckeditor5-utils": "43.0.0-alpha.1",
|
|
22
|
+
"@ckeditor/ckeditor5-widget": "43.0.0-alpha.1",
|
|
23
|
+
"ckeditor5": "43.0.0-alpha.1",
|
|
24
24
|
"lodash-es": "4.17.21"
|
|
25
25
|
},
|
|
26
26
|
"author": "CKSource (http://cksource.com/)",
|
package/src/linkui.js
CHANGED
|
@@ -65,9 +65,13 @@ export default class LinkUI extends Plugin {
|
|
|
65
65
|
// Renders a fake visual selection marker on a collapsed selection.
|
|
66
66
|
editor.conversion.for('editingDowncast').markerToElement({
|
|
67
67
|
model: VISUAL_SELECTION_MARKER_NAME,
|
|
68
|
-
view: {
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
view: (data, { writer }) => {
|
|
69
|
+
if (!data.markerRange.isCollapsed) {
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
const markerElement = writer.createUIElement('span');
|
|
73
|
+
writer.addClass(['ck-fake-link-selection', 'ck-fake-link-selection_collapsed'], markerElement);
|
|
74
|
+
return markerElement;
|
|
71
75
|
}
|
|
72
76
|
});
|
|
73
77
|
// Add the information about the keystrokes to the accessibility database.
|
|
@@ -184,18 +188,19 @@ export default class LinkUI extends Plugin {
|
|
|
184
188
|
*/
|
|
185
189
|
_createToolbarLinkButton() {
|
|
186
190
|
const editor = this.editor;
|
|
187
|
-
const linkCommand = editor.commands.get('link');
|
|
188
191
|
editor.ui.componentFactory.add('link', () => {
|
|
189
192
|
const button = this._createButton(ButtonView);
|
|
190
193
|
button.set({
|
|
191
|
-
tooltip: true
|
|
192
|
-
isToggleable: true
|
|
194
|
+
tooltip: true
|
|
193
195
|
});
|
|
194
|
-
button.bind('isOn').to(linkCommand, 'value', value => !!value);
|
|
195
196
|
return button;
|
|
196
197
|
});
|
|
197
198
|
editor.ui.componentFactory.add('menuBar:link', () => {
|
|
198
|
-
|
|
199
|
+
const button = this._createButton(MenuBarMenuListItemButtonView);
|
|
200
|
+
button.set({
|
|
201
|
+
role: 'menuitemcheckbox'
|
|
202
|
+
});
|
|
203
|
+
return button;
|
|
199
204
|
});
|
|
200
205
|
}
|
|
201
206
|
/**
|
|
@@ -210,9 +215,11 @@ export default class LinkUI extends Plugin {
|
|
|
210
215
|
view.set({
|
|
211
216
|
label: t('Link'),
|
|
212
217
|
icon: linkIcon,
|
|
213
|
-
keystroke: LINK_KEYSTROKE
|
|
218
|
+
keystroke: LINK_KEYSTROKE,
|
|
219
|
+
isToggleable: true
|
|
214
220
|
});
|
|
215
221
|
view.bind('isEnabled').to(command, 'isEnabled');
|
|
222
|
+
view.bind('isOn').to(command, 'value', value => !!value);
|
|
216
223
|
// Show the panel on button click.
|
|
217
224
|
this.listenTo(view, 'execute', () => this._showUI(true));
|
|
218
225
|
return view;
|