@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.
@@ -10774,6 +10774,7 @@ var ImageExtension = Menu$3.Node.create({
10774
10774
  src = _node$attrs.src,
10775
10775
  figheight = _node$attrs.figheight,
10776
10776
  figwidth = _node$attrs.figwidth;
10777
+ if (!src) return ["span"];
10777
10778
  var openImageInNewTab = this.options.openImageInNewTab;
10778
10779
  var wrapperDivAttrs = {
10779
10780
  "class": "neeto-editor__image-wrapper neeto-editor__image--".concat(align)
@@ -10790,14 +10791,10 @@ var ImageExtension = Menu$3.Node.create({
10790
10791
  var captionAttrs = {
10791
10792
  style: "width:".concat(figwidth, "px;")
10792
10793
  };
10793
- var imageNode = [];
10794
- if (src) {
10795
- imageNode = ["img", Menu$3.mergeAttributes(HTMLAttributes, {
10796
- draggable: false,
10797
- contenteditable: false
10798
- })];
10799
- }
10800
- return ["div", wrapperDivAttrs, ["figure", this.options.HTMLAttributes, ["a", wrapperLinkAttrs, imageNode], ["figcaption", captionAttrs, 0]]];
10794
+ return ["div", wrapperDivAttrs, ["figure", this.options.HTMLAttributes, ["a", wrapperLinkAttrs, ["img", Menu$3.mergeAttributes(HTMLAttributes, {
10795
+ draggable: false,
10796
+ contenteditable: false
10797
+ })]], ["figcaption", captionAttrs, 0]]];
10801
10798
  },
10802
10799
  addNodeView: function addNodeView() {
10803
10800
  return Menu$3.ReactNodeViewRenderer(ImageComponent);