@bigbinary/neeto-editor 1.43.3 → 1.43.4

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/Editor.js CHANGED
@@ -10698,6 +10698,7 @@ var ImageExtension = Node.create({
10698
10698
  src = _node$attrs.src,
10699
10699
  figheight = _node$attrs.figheight,
10700
10700
  figwidth = _node$attrs.figwidth;
10701
+ if (!src) return ["span"];
10701
10702
  var openImageInNewTab = this.options.openImageInNewTab;
10702
10703
  var wrapperDivAttrs = {
10703
10704
  "class": "neeto-editor__image-wrapper neeto-editor__image--".concat(align)
@@ -10714,14 +10715,10 @@ var ImageExtension = Node.create({
10714
10715
  var captionAttrs = {
10715
10716
  style: "width:".concat(figwidth, "px;")
10716
10717
  };
10717
- var imageNode = [];
10718
- if (src) {
10719
- imageNode = ["img", mergeAttributes(HTMLAttributes, {
10720
- draggable: false,
10721
- contenteditable: false
10722
- })];
10723
- }
10724
- return ["div", wrapperDivAttrs, ["figure", this.options.HTMLAttributes, ["a", wrapperLinkAttrs, imageNode], ["figcaption", captionAttrs, 0]]];
10718
+ return ["div", wrapperDivAttrs, ["figure", this.options.HTMLAttributes, ["a", wrapperLinkAttrs, ["img", mergeAttributes(HTMLAttributes, {
10719
+ draggable: false,
10720
+ contenteditable: false
10721
+ })]], ["figcaption", captionAttrs, 0]]];
10725
10722
  },
10726
10723
  addNodeView: function addNodeView() {
10727
10724
  return ReactNodeViewRenderer(ImageComponent);