@ckeditor/ckeditor5-link 0.0.0-nightly-20240703.0 → 0.0.0-nightly-20240705.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-link",
3
- "version": "0.0.0-nightly-20240703.0",
3
+ "version": "0.0.0-nightly-20240705.0",
4
4
  "description": "Link feature for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -13,8 +13,8 @@
13
13
  "type": "module",
14
14
  "main": "src/index.js",
15
15
  "dependencies": {
16
- "@ckeditor/ckeditor5-ui": "0.0.0-nightly-20240703.0",
17
- "ckeditor5": "0.0.0-nightly-20240703.0",
16
+ "@ckeditor/ckeditor5-ui": "0.0.0-nightly-20240705.0",
17
+ "ckeditor5": "0.0.0-nightly-20240705.0",
18
18
  "lodash-es": "4.17.21"
19
19
  },
20
20
  "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
- name: 'span',
70
- classes: ['ck-fake-link-selection', 'ck-fake-link-selection_collapsed']
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.