@ckeditor/ckeditor5-link 47.7.1-alpha.0 → 47.7.2-alpha.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/dist/index.js +9 -6
- package/dist/index.js.map +1 -1
- package/package.json +11 -11
- package/src/linkcommand.js +4 -2
- package/src/linkimageediting.js +2 -2
- package/src/linkui.js +1 -1
- package/src/ui/linkformview.js +1 -1
- package/src/unlinkcommand.js +2 -1
package/dist/index.js
CHANGED
|
@@ -424,7 +424,8 @@ const DEFAULT_LINK_PROTOCOLS = [
|
|
|
424
424
|
const selection = model.document.selection;
|
|
425
425
|
const selectedElement = selection.getSelectedElement() || first(selection.getSelectedBlocks());
|
|
426
426
|
// A check for any integration that allows linking elements (e.g. `LinkImage`).
|
|
427
|
-
// Currently the selection reads attributes from text nodes only.
|
|
427
|
+
// Currently the selection reads attributes from text nodes only.
|
|
428
|
+
// See https://github.com/ckeditor/ckeditor5/issues/7429 and https://github.com/ckeditor/ckeditor5/issues/7465.
|
|
428
429
|
if (isLinkableElement(selectedElement, model.schema)) {
|
|
429
430
|
this.value = selectedElement.getAttribute('linkHref');
|
|
430
431
|
this.isEnabled = model.schema.checkAttribute(selectedElement, 'linkHref');
|
|
@@ -687,7 +688,8 @@ const DEFAULT_LINK_PROTOCOLS = [
|
|
|
687
688
|
const selection = model.document.selection;
|
|
688
689
|
const selectedElement = selection.getSelectedElement();
|
|
689
690
|
// A check for the `LinkImage` plugin. If the selection contains an element, get values from the element.
|
|
690
|
-
// Currently the selection reads attributes from text nodes only.
|
|
691
|
+
// Currently the selection reads attributes from text nodes only.
|
|
692
|
+
// See https://github.com/ckeditor/ckeditor5/issues/7429 and https://github.com/ckeditor/ckeditor5/issues/7465.
|
|
691
693
|
if (isLinkableElement(selectedElement, model.schema)) {
|
|
692
694
|
return selectedElement.getAttribute(decoratorName);
|
|
693
695
|
}
|
|
@@ -813,7 +815,8 @@ const DEFAULT_LINK_PROTOCOLS = [
|
|
|
813
815
|
const selection = model.document.selection;
|
|
814
816
|
const selectedElement = selection.getSelectedElement();
|
|
815
817
|
// A check for any integration that allows linking elements (e.g. `LinkImage`).
|
|
816
|
-
// Currently the selection reads attributes from text nodes only.
|
|
818
|
+
// Currently the selection reads attributes from text nodes only.
|
|
819
|
+
// See https://github.com/ckeditor/ckeditor5/issues/7429 and https://github.com/ckeditor/ckeditor5/issues/7465.
|
|
817
820
|
if (isLinkableElement(selectedElement, model.schema)) {
|
|
818
821
|
this.isEnabled = model.schema.checkAttribute(selectedElement, 'linkHref');
|
|
819
822
|
} else {
|
|
@@ -2067,7 +2070,7 @@ const VISUAL_SELECTION_MARKER_NAME = 'link-ui';
|
|
|
2067
2070
|
* @inheritDoc
|
|
2068
2071
|
*/ destroy() {
|
|
2069
2072
|
super.destroy();
|
|
2070
|
-
// Destroy created UI components as they are not automatically destroyed (see ckeditor5
|
|
2073
|
+
// Destroy created UI components as they are not automatically destroyed (see https://github.com/ckeditor/ckeditor5/issues/1341).
|
|
2071
2074
|
if (this.propertiesView) {
|
|
2072
2075
|
this.propertiesView.destroy();
|
|
2073
2076
|
}
|
|
@@ -3420,7 +3423,7 @@ function linkIsAlreadySet(range) {
|
|
|
3420
3423
|
const linkInImage = Array.from(viewFigure.getChildren()).find((child)=>child.is('element', 'a'));
|
|
3421
3424
|
// The <a> element was removed by the time this converter is executed.
|
|
3422
3425
|
// It may happen when the base `linkHref` and decorator attributes are removed
|
|
3423
|
-
// at the same time (see
|
|
3426
|
+
// at the same time (see https://github.com/ckeditor/ckeditor5/issues/8401).
|
|
3424
3427
|
if (!linkInImage) {
|
|
3425
3428
|
return;
|
|
3426
3429
|
}
|
|
@@ -3470,7 +3473,7 @@ function linkIsAlreadySet(range) {
|
|
|
3470
3473
|
const viewLink = data.viewItem;
|
|
3471
3474
|
const imageInLink = imageUtils.findViewImgElement(viewLink);
|
|
3472
3475
|
// We need to check whether an image is inside a link because the converter handles
|
|
3473
|
-
// only manual decorators for linked images. See
|
|
3476
|
+
// only manual decorators for linked images. See https://github.com/ckeditor/ckeditor5/issues/7975.
|
|
3474
3477
|
if (!imageInLink) {
|
|
3475
3478
|
return;
|
|
3476
3479
|
}
|