@ckeditor/ckeditor5-link 45.0.0-alpha.6 → 45.0.0-alpha.7
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/build/link.js +1 -1
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -1
- package/package.json +11 -11
- package/src/linkimageediting.js +14 -0
- package/src/linkui.js +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-link",
|
|
3
|
-
"version": "45.0.0-alpha.
|
|
3
|
+
"version": "45.0.0-alpha.7",
|
|
4
4
|
"description": "Link feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -13,16 +13,16 @@
|
|
|
13
13
|
"type": "module",
|
|
14
14
|
"main": "src/index.js",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@ckeditor/ckeditor5-clipboard": "45.0.0-alpha.
|
|
17
|
-
"@ckeditor/ckeditor5-core": "45.0.0-alpha.
|
|
18
|
-
"@ckeditor/ckeditor5-engine": "45.0.0-alpha.
|
|
19
|
-
"@ckeditor/ckeditor5-icons": "45.0.0-alpha.
|
|
20
|
-
"@ckeditor/ckeditor5-image": "45.0.0-alpha.
|
|
21
|
-
"@ckeditor/ckeditor5-typing": "45.0.0-alpha.
|
|
22
|
-
"@ckeditor/ckeditor5-ui": "45.0.0-alpha.
|
|
23
|
-
"@ckeditor/ckeditor5-utils": "45.0.0-alpha.
|
|
24
|
-
"@ckeditor/ckeditor5-widget": "45.0.0-alpha.
|
|
25
|
-
"ckeditor5": "45.0.0-alpha.
|
|
16
|
+
"@ckeditor/ckeditor5-clipboard": "45.0.0-alpha.7",
|
|
17
|
+
"@ckeditor/ckeditor5-core": "45.0.0-alpha.7",
|
|
18
|
+
"@ckeditor/ckeditor5-engine": "45.0.0-alpha.7",
|
|
19
|
+
"@ckeditor/ckeditor5-icons": "45.0.0-alpha.7",
|
|
20
|
+
"@ckeditor/ckeditor5-image": "45.0.0-alpha.7",
|
|
21
|
+
"@ckeditor/ckeditor5-typing": "45.0.0-alpha.7",
|
|
22
|
+
"@ckeditor/ckeditor5-ui": "45.0.0-alpha.7",
|
|
23
|
+
"@ckeditor/ckeditor5-utils": "45.0.0-alpha.7",
|
|
24
|
+
"@ckeditor/ckeditor5-widget": "45.0.0-alpha.7",
|
|
25
|
+
"ckeditor5": "45.0.0-alpha.7",
|
|
26
26
|
"es-toolkit": "1.32.0"
|
|
27
27
|
},
|
|
28
28
|
"author": "CKSource (http://cksource.com/)",
|
package/src/linkimageediting.js
CHANGED
|
@@ -198,6 +198,20 @@ function downcastImageLinkManualDecorator(decorator) {
|
|
|
198
198
|
if (!linkInImage) {
|
|
199
199
|
return;
|
|
200
200
|
}
|
|
201
|
+
// Handle deactivated manual decorator.
|
|
202
|
+
if (decorator.value === undefined) {
|
|
203
|
+
for (const key in decorator.attributes) {
|
|
204
|
+
conversionApi.writer.removeAttribute(key, linkInImage);
|
|
205
|
+
}
|
|
206
|
+
if (decorator.classes) {
|
|
207
|
+
conversionApi.writer.removeClass(decorator.classes, linkInImage);
|
|
208
|
+
}
|
|
209
|
+
for (const key in decorator.styles) {
|
|
210
|
+
conversionApi.writer.removeStyle(key, linkInImage);
|
|
211
|
+
}
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
// Handle activated manual decorator.
|
|
201
215
|
for (const [key, val] of toMap(decorator.attributes)) {
|
|
202
216
|
conversionApi.writer.setAttribute(key, val, linkInImage);
|
|
203
217
|
}
|
package/src/linkui.js
CHANGED
|
@@ -498,6 +498,7 @@ export default class LinkUI extends Plugin {
|
|
|
498
498
|
view.bind('isOn').to(command, 'value', value => !!value);
|
|
499
499
|
// Show the panel on button click.
|
|
500
500
|
this.listenTo(view, 'execute', () => {
|
|
501
|
+
editor.editing.view.scrollToTheSelection();
|
|
501
502
|
this._showUI(true);
|
|
502
503
|
// Open the form view on-top of the toolbar view if it's already visible.
|
|
503
504
|
// It should be visible every time the link is selected.
|
|
@@ -528,6 +529,7 @@ export default class LinkUI extends Plugin {
|
|
|
528
529
|
// Prevent focusing the search bar in FF, Chrome and Edge. See https://github.com/ckeditor/ckeditor5/issues/4811.
|
|
529
530
|
cancel();
|
|
530
531
|
if (editor.commands.get('link').isEnabled) {
|
|
532
|
+
editor.editing.view.scrollToTheSelection();
|
|
531
533
|
this._showUI(true);
|
|
532
534
|
}
|
|
533
535
|
});
|