@ckeditor/ckeditor5-link 46.1.1 → 47.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-link",
3
- "version": "46.1.1",
3
+ "version": "47.0.0-alpha.1",
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": "46.1.1",
17
- "@ckeditor/ckeditor5-core": "46.1.1",
18
- "@ckeditor/ckeditor5-engine": "46.1.1",
19
- "@ckeditor/ckeditor5-icons": "46.1.1",
20
- "@ckeditor/ckeditor5-image": "46.1.1",
21
- "@ckeditor/ckeditor5-typing": "46.1.1",
22
- "@ckeditor/ckeditor5-ui": "46.1.1",
23
- "@ckeditor/ckeditor5-utils": "46.1.1",
24
- "@ckeditor/ckeditor5-widget": "46.1.1",
25
- "ckeditor5": "46.1.1",
16
+ "@ckeditor/ckeditor5-clipboard": "47.0.0-alpha.1",
17
+ "@ckeditor/ckeditor5-core": "47.0.0-alpha.1",
18
+ "@ckeditor/ckeditor5-engine": "47.0.0-alpha.1",
19
+ "@ckeditor/ckeditor5-icons": "47.0.0-alpha.1",
20
+ "@ckeditor/ckeditor5-image": "47.0.0-alpha.1",
21
+ "@ckeditor/ckeditor5-typing": "47.0.0-alpha.1",
22
+ "@ckeditor/ckeditor5-ui": "47.0.0-alpha.1",
23
+ "@ckeditor/ckeditor5-utils": "47.0.0-alpha.1",
24
+ "@ckeditor/ckeditor5-widget": "47.0.0-alpha.1",
25
+ "ckeditor5": "47.0.0-alpha.1",
26
26
  "es-toolkit": "1.39.5"
27
27
  },
28
28
  "author": "CKSource (http://cksource.com/)",
@@ -199,7 +199,7 @@ function downcastImageLinkManualDecorator(decorator) {
199
199
  return;
200
200
  }
201
201
  // Handle deactivated manual decorator.
202
- if (decorator.value === undefined) {
202
+ if (data.attributeOldValue) {
203
203
  for (const key in decorator.attributes) {
204
204
  conversionApi.writer.removeAttribute(key, linkInImage);
205
205
  }
@@ -209,17 +209,18 @@ function downcastImageLinkManualDecorator(decorator) {
209
209
  for (const key in decorator.styles) {
210
210
  conversionApi.writer.removeStyle(key, linkInImage);
211
211
  }
212
- return;
213
212
  }
214
213
  // Handle activated manual decorator.
215
- for (const [key, val] of toMap(decorator.attributes)) {
216
- conversionApi.writer.setAttribute(key, val, linkInImage);
217
- }
218
- if (decorator.classes) {
219
- conversionApi.writer.addClass(decorator.classes, linkInImage);
220
- }
221
- for (const key in decorator.styles) {
222
- conversionApi.writer.setStyle(key, decorator.styles[key], linkInImage);
214
+ if (data.attributeNewValue) {
215
+ for (const [key, val] of toMap(decorator.attributes)) {
216
+ conversionApi.writer.setAttribute(key, val, linkInImage);
217
+ }
218
+ if (decorator.classes) {
219
+ conversionApi.writer.addClass(decorator.classes, linkInImage);
220
+ }
221
+ for (const key in decorator.styles) {
222
+ conversionApi.writer.setStyle(key, decorator.styles[key], linkInImage);
223
+ }
223
224
  }
224
225
  });
225
226
  };