@ckeditor/ckeditor5-link 31.1.0 → 34.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.
Files changed (82) hide show
  1. package/LICENSE.md +2 -2
  2. package/README.md +2 -1
  3. package/build/link.js +3 -3
  4. package/build/link.js.map +1 -0
  5. package/build/translations/el.js +1 -1
  6. package/build/translations/fi.js +1 -1
  7. package/build/translations/hr.js +1 -1
  8. package/lang/translations/ar.po +1 -1
  9. package/lang/translations/ast.po +1 -1
  10. package/lang/translations/az.po +1 -1
  11. package/lang/translations/bg.po +1 -1
  12. package/lang/translations/cs.po +1 -1
  13. package/lang/translations/da.po +1 -1
  14. package/lang/translations/de-ch.po +1 -1
  15. package/lang/translations/de.po +1 -1
  16. package/lang/translations/el.po +7 -7
  17. package/lang/translations/en-au.po +1 -1
  18. package/lang/translations/en-gb.po +1 -1
  19. package/lang/translations/en.po +1 -1
  20. package/lang/translations/eo.po +1 -1
  21. package/lang/translations/es.po +1 -1
  22. package/lang/translations/et.po +1 -1
  23. package/lang/translations/eu.po +1 -1
  24. package/lang/translations/fa.po +1 -1
  25. package/lang/translations/fi.po +3 -3
  26. package/lang/translations/fr.po +1 -1
  27. package/lang/translations/gl.po +1 -1
  28. package/lang/translations/he.po +1 -1
  29. package/lang/translations/hi.po +1 -1
  30. package/lang/translations/hr.po +2 -2
  31. package/lang/translations/hu.po +1 -1
  32. package/lang/translations/id.po +1 -1
  33. package/lang/translations/it.po +1 -1
  34. package/lang/translations/ja.po +1 -1
  35. package/lang/translations/km.po +1 -1
  36. package/lang/translations/kn.po +1 -1
  37. package/lang/translations/ko.po +1 -1
  38. package/lang/translations/ku.po +1 -1
  39. package/lang/translations/lt.po +1 -1
  40. package/lang/translations/lv.po +1 -1
  41. package/lang/translations/nb.po +1 -1
  42. package/lang/translations/ne.po +1 -1
  43. package/lang/translations/nl.po +1 -1
  44. package/lang/translations/no.po +1 -1
  45. package/lang/translations/pl.po +1 -1
  46. package/lang/translations/pt-br.po +1 -1
  47. package/lang/translations/pt.po +1 -1
  48. package/lang/translations/ro.po +1 -1
  49. package/lang/translations/ru.po +1 -1
  50. package/lang/translations/sk.po +1 -1
  51. package/lang/translations/sq.po +1 -1
  52. package/lang/translations/sr-latn.po +1 -1
  53. package/lang/translations/sr.po +1 -1
  54. package/lang/translations/sv.po +1 -1
  55. package/lang/translations/tk.po +1 -1
  56. package/lang/translations/tr.po +1 -1
  57. package/lang/translations/ug.po +1 -1
  58. package/lang/translations/uk.po +1 -1
  59. package/lang/translations/uz.po +1 -1
  60. package/lang/translations/vi.po +1 -1
  61. package/lang/translations/zh-cn.po +1 -1
  62. package/lang/translations/zh.po +1 -1
  63. package/package.json +24 -24
  64. package/src/autolink.js +2 -4
  65. package/src/index.js +1 -1
  66. package/src/link.js +1 -1
  67. package/src/linkcommand.js +1 -1
  68. package/src/linkediting.js +12 -6
  69. package/src/linkimage.js +1 -1
  70. package/src/linkimageediting.js +1 -1
  71. package/src/linkimageui.js +1 -1
  72. package/src/linkui.js +1 -1
  73. package/src/ui/linkactionsview.js +1 -1
  74. package/src/ui/linkformview.js +1 -1
  75. package/src/unlinkcommand.js +1 -1
  76. package/src/utils/automaticdecorators.js +8 -2
  77. package/src/utils/manualdecorator.js +1 -1
  78. package/src/utils.js +1 -1
  79. package/theme/link.css +1 -1
  80. package/theme/linkactions.css +1 -1
  81. package/theme/linkform.css +1 -1
  82. package/theme/linkimage.css +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * @license Copyright (c) 2003-2022, 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
 
@@ -193,8 +193,13 @@ export default class LinkEditing extends Plugin {
193
193
 
194
194
  editor.conversion.for( 'downcast' ).attributeToElement( {
195
195
  model: decorator.id,
196
- view: ( manualDecoratorName, { writer } ) => {
197
- if ( manualDecoratorName ) {
196
+ view: ( manualDecoratorValue, { writer, schema }, { item } ) => {
197
+ // Manual decorators for block links are handled e.g. in LinkImageEditing.
198
+ if ( !schema.isInline( item ) ) {
199
+ return;
200
+ }
201
+
202
+ if ( manualDecoratorValue ) {
198
203
  const element = writer.createAttributeElement( 'a', decorator.attributes, { priority: 5 } );
199
204
 
200
205
  if ( decorator.classes ) {
@@ -209,7 +214,8 @@ export default class LinkEditing extends Plugin {
209
214
 
210
215
  return element;
211
216
  }
212
- } } );
217
+ }
218
+ } );
213
219
 
214
220
  editor.conversion.for( 'upcast' ).elementToAttribute( {
215
221
  view: {
@@ -642,9 +648,9 @@ function shouldCopyAttributes( model ) {
642
648
  // @params {module:core/editor/editor~Editor} editor
643
649
  // @returns {Boolean}
644
650
  function isTyping( editor ) {
645
- const input = editor.plugins.get( 'Input' );
651
+ const currentBatch = editor.model.change( writer => writer.batch );
646
652
 
647
- return input.isInput( editor.model.change( writer => writer.batch ) );
653
+ return currentBatch.isTyping;
648
654
  }
649
655
 
650
656
  // Returns an array containing names of the attributes allowed on `$text` that describes the link item.
package/src/linkimage.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * @license Copyright (c) 2003-2022, 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
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * @license Copyright (c) 2003-2022, 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
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * @license Copyright (c) 2003-2022, 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
 
package/src/linkui.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * @license Copyright (c) 2003-2022, 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
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * @license Copyright (c) 2003-2022, 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
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * @license Copyright (c) 2003-2022, 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
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * @license Copyright (c) 2003-2022, 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
 
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
3
- * For licensing, see LICENSE.md.
2
+ * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
6
6
  /**
@@ -66,6 +66,12 @@ export default class AutomaticDecorators {
66
66
  if ( !conversionApi.consumable.test( data.item, 'attribute:linkHref' ) ) {
67
67
  return;
68
68
  }
69
+
70
+ // Automatic decorators for block links are handled e.g. in LinkImageEditing.
71
+ if ( !( data.item.is( 'selection' ) || conversionApi.schema.isInline( data.item ) ) ) {
72
+ return;
73
+ }
74
+
69
75
  const viewWriter = conversionApi.writer;
70
76
  const viewSelection = viewWriter.document.selection;
71
77
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * @license Copyright (c) 2003-2022, 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
 
package/src/utils.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * @license Copyright (c) 2003-2022, 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
 
package/theme/link.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2003-2022, 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
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2003-2022, 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
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2003-2022, 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
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2003-2022, 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