@bigbinary/neeto-editor 1.43.2 → 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);
@@ -19390,8 +19387,9 @@ var useCustomExtensions = function useCustomExtensions(_ref) {
19390
19387
  customExtensions.push(Variable);
19391
19388
  }
19392
19389
  if (collaborationProvider) {
19390
+ var _collaborationProvide;
19393
19391
  customExtensions.push(Collaboration.configure({
19394
- document: collaborationProvider.document
19392
+ document: (_collaborationProvide = collaborationProvider.document) !== null && _collaborationProvide !== void 0 ? _collaborationProvide : collaborationProvider.doc
19395
19393
  }));
19396
19394
  customExtensions.push(CollaborationCursor.configure({
19397
19395
  provider: collaborationProvider