@bigbinary/neeto-editor 1.47.13 → 1.47.14

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.
@@ -5,7 +5,7 @@ var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
5
5
  var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
6
6
  var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
7
7
  var React = require('react');
8
- var Menu$3 = require('./chunk-DnuP-Z6c.cjs.js');
8
+ var Menu$3 = require('./chunk-26e51eTo.cjs.js');
9
9
  var classnames = require('classnames');
10
10
  var constants = require('./chunk-C2JDXWdK.cjs.js');
11
11
  var neetoCist = require('@bigbinary/neeto-cist');
@@ -65,6 +65,12 @@ var Video = require('@bigbinary/neeto-icons/Video');
65
65
  var Notes = require('@bigbinary/neeto-icons/Notes');
66
66
  var MediaVideo = require('@bigbinary/neeto-icons/MediaVideo');
67
67
  var Column = require('@bigbinary/neeto-icons/Column');
68
+ var TextBold = require('@bigbinary/neeto-icons/TextBold');
69
+ var TextItalic = require('@bigbinary/neeto-icons/TextItalic');
70
+ var Underline$1 = require('@bigbinary/neeto-icons/Underline');
71
+ var Link$2 = require('@bigbinary/neeto-icons/Link');
72
+ var Attachment = require('@bigbinary/neeto-icons/Attachment');
73
+ var MessageSquare = require('@bigbinary/neeto-icons/MessageSquare');
68
74
  var Tooltip = require('@bigbinary/neetoui/Tooltip');
69
75
  var DeleteRow = require('@bigbinary/neeto-icons/DeleteRow');
70
76
  var DeleteColumn = require('@bigbinary/neeto-icons/DeleteColumn');
@@ -78,16 +84,11 @@ var Form = require('@bigbinary/neetoui/formik/Form');
78
84
  var Input$1 = require('@bigbinary/neetoui/formik/Input');
79
85
  var Attachments = require('./chunk-DrD8BaMo.cjs.js');
80
86
  require('tippy.js/dist/svg-arrow.css');
81
- require('@bigbinary/neeto-icons/Link');
82
87
  require('@bigbinary/neeto-commons-frontend/utils');
83
88
  require('@bigbinary/neeto-icons/Check');
84
89
  require('@bigbinary/neeto-icons/Quote');
85
- require('@bigbinary/neeto-icons/Attachment');
86
90
  require('@bigbinary/neeto-icons/Code');
87
- require('@bigbinary/neeto-icons/TextBold');
88
91
  require('@bigbinary/neeto-icons/TextCross');
89
- require('@bigbinary/neeto-icons/TextItalic');
90
- require('@bigbinary/neeto-icons/Underline');
91
92
  require('@bigbinary/neeto-icons/Undo');
92
93
  require('@bigbinary/neeto-icons/Redo');
93
94
  require('@bigbinary/neeto-icons/Email');
@@ -13948,8 +13949,7 @@ var Menu = /*#__PURE__*/function (_React$Component) {
13948
13949
  range = _this$props.range;
13949
13950
  var selectedItem = items[index];
13950
13951
  var hasCommand = selectedItem && selectedItem.command;
13951
- var isLeafNode = neetoCist.isNotPresent(selectedItem.items);
13952
- if (hasCommand && isLeafNode) selectedItem.command({
13952
+ if (hasCommand) selectedItem.command({
13953
13953
  editor: editor,
13954
13954
  range: range
13955
13955
  });
@@ -14050,7 +14050,7 @@ var Menu = /*#__PURE__*/function (_React$Component) {
14050
14050
  item: item,
14051
14051
  key: item.optionName,
14052
14052
  selectItem: function selectItem() {
14053
- return isLeafNode && _this2.selectItem(index);
14053
+ return _this2.selectItem(index);
14054
14054
  },
14055
14055
  selectedIndex: isCurrentMenuActive ? selectedIndex : -1,
14056
14056
  onHover: function onHover() {
@@ -14063,6 +14063,7 @@ var Menu = /*#__PURE__*/function (_React$Component) {
14063
14063
  return /*#__PURE__*/jsxRuntime.jsx(Tippy, {
14064
14064
  interactive: true,
14065
14065
  placement: "right",
14066
+ theme: "light neeto-editor-slash-commands-tippy",
14066
14067
  visible: selectedIndex === index,
14067
14068
  content: /*#__PURE__*/jsxRuntime.jsx(Menu, _objectSpread$7(_objectSpread$7({}, _this2.props), {}, {
14068
14069
  items: item.items,
@@ -14163,14 +14164,44 @@ var MENU_ITEMS = [{
14163
14164
  range = _ref.range;
14164
14165
  editor.chain().focus().deleteRange(range).setNode("paragraph").run();
14165
14166
  }
14167
+ }, {
14168
+ optionName: constants.EDITOR_OPTIONS.BOLD,
14169
+ title: i18n.t("neetoEditor.menu.bold"),
14170
+ description: i18n.t("neetoEditor.menu.boldDescription"),
14171
+ Icon: TextBold,
14172
+ command: function command(_ref2) {
14173
+ var editor = _ref2.editor,
14174
+ range = _ref2.range;
14175
+ editor.chain().focus().deleteRange(range).toggleBold().run();
14176
+ }
14177
+ }, {
14178
+ optionName: constants.EDITOR_OPTIONS.ITALIC,
14179
+ title: i18n.t("neetoEditor.menu.italic"),
14180
+ description: i18n.t("neetoEditor.menu.italicDescription"),
14181
+ Icon: TextItalic,
14182
+ command: function command(_ref3) {
14183
+ var editor = _ref3.editor,
14184
+ range = _ref3.range;
14185
+ editor.chain().focus().deleteRange(range).toggleItalic().run();
14186
+ }
14187
+ }, {
14188
+ optionName: constants.EDITOR_OPTIONS.UNDERLINE,
14189
+ title: i18n.t("neetoEditor.menu.underline"),
14190
+ description: i18n.t("neetoEditor.menu.underlineDescription"),
14191
+ Icon: Underline$1,
14192
+ command: function command(_ref4) {
14193
+ var editor = _ref4.editor,
14194
+ range = _ref4.range;
14195
+ editor.chain().focus().deleteRange(range).toggleUnderline().run();
14196
+ }
14166
14197
  }, {
14167
14198
  optionName: constants.EDITOR_OPTIONS.H1,
14168
14199
  title: i18n.t("neetoEditor.menu.heading1"),
14169
14200
  description: i18n.t("neetoEditor.menu.h1Description"),
14170
14201
  Icon: TextH1,
14171
- command: function command(_ref2) {
14172
- var editor = _ref2.editor,
14173
- range = _ref2.range;
14202
+ command: function command(_ref5) {
14203
+ var editor = _ref5.editor,
14204
+ range = _ref5.range;
14174
14205
  editor.chain().focus().deleteRange(range).setNode("heading", {
14175
14206
  level: 1
14176
14207
  }).run();
@@ -14180,9 +14211,9 @@ var MENU_ITEMS = [{
14180
14211
  title: i18n.t("neetoEditor.menu.heading2"),
14181
14212
  description: i18n.t("neetoEditor.menu.h2Description"),
14182
14213
  Icon: TextH2,
14183
- command: function command(_ref3) {
14184
- var editor = _ref3.editor,
14185
- range = _ref3.range;
14214
+ command: function command(_ref6) {
14215
+ var editor = _ref6.editor,
14216
+ range = _ref6.range;
14186
14217
  editor.chain().focus().deleteRange(range).setNode("heading", {
14187
14218
  level: 2
14188
14219
  }).run();
@@ -14192,9 +14223,9 @@ var MENU_ITEMS = [{
14192
14223
  title: i18n.t("neetoEditor.menu.heading3"),
14193
14224
  description: i18n.t("neetoEditor.menu.h3Description"),
14194
14225
  Icon: TextH3,
14195
- command: function command(_ref4) {
14196
- var editor = _ref4.editor,
14197
- range = _ref4.range;
14226
+ command: function command(_ref7) {
14227
+ var editor = _ref7.editor,
14228
+ range = _ref7.range;
14198
14229
  editor.chain().focus().deleteRange(range).setNode("heading", {
14199
14230
  level: 3
14200
14231
  }).run();
@@ -14204,9 +14235,9 @@ var MENU_ITEMS = [{
14204
14235
  title: i18n.t("neetoEditor.menu.heading4"),
14205
14236
  description: i18n.t("neetoEditor.menu.h4Description"),
14206
14237
  Icon: TextH4,
14207
- command: function command(_ref5) {
14208
- var editor = _ref5.editor,
14209
- range = _ref5.range;
14238
+ command: function command(_ref8) {
14239
+ var editor = _ref8.editor,
14240
+ range = _ref8.range;
14210
14241
  editor.chain().focus().deleteRange(range).setNode("heading", {
14211
14242
  level: 4
14212
14243
  }).run();
@@ -14216,9 +14247,9 @@ var MENU_ITEMS = [{
14216
14247
  title: i18n.t("neetoEditor.menu.heading5"),
14217
14248
  description: i18n.t("neetoEditor.menu.h5Description"),
14218
14249
  Icon: TextH5,
14219
- command: function command(_ref6) {
14220
- var editor = _ref6.editor,
14221
- range = _ref6.range;
14250
+ command: function command(_ref9) {
14251
+ var editor = _ref9.editor,
14252
+ range = _ref9.range;
14222
14253
  editor.chain().focus().deleteRange(range).setNode("heading", {
14223
14254
  level: 5
14224
14255
  }).run();
@@ -14228,9 +14259,9 @@ var MENU_ITEMS = [{
14228
14259
  title: i18n.t("neetoEditor.menu.numberedList"),
14229
14260
  description: i18n.t("neetoEditor.menu.numberedListDescription"),
14230
14261
  Icon: ListNumber,
14231
- command: function command(_ref7) {
14232
- var editor = _ref7.editor,
14233
- range = _ref7.range;
14262
+ command: function command(_ref10) {
14263
+ var editor = _ref10.editor,
14264
+ range = _ref10.range;
14234
14265
  editor.chain().focus().deleteRange(range).toggleOrderedList().run();
14235
14266
  }
14236
14267
  }, {
@@ -14238,19 +14269,31 @@ var MENU_ITEMS = [{
14238
14269
  title: i18n.t("neetoEditor.menu.bulletList"),
14239
14270
  description: i18n.t("neetoEditor.menu.bulletListDescription"),
14240
14271
  Icon: ListDot,
14241
- command: function command(_ref8) {
14242
- var editor = _ref8.editor,
14243
- range = _ref8.range;
14272
+ command: function command(_ref11) {
14273
+ var editor = _ref11.editor,
14274
+ range = _ref11.range;
14244
14275
  editor.chain().focus().deleteRange(range).toggleBulletList().run();
14245
14276
  }
14277
+ }, {
14278
+ optionName: constants.EDITOR_OPTIONS.LINK,
14279
+ title: i18n.t("neetoEditor.menu.link"),
14280
+ description: i18n.t("neetoEditor.menu.linkDescription"),
14281
+ Icon: Link$2,
14282
+ command: neetoCist.noop
14283
+ }, {
14284
+ optionName: constants.EDITOR_OPTIONS.ATTACHMENTS,
14285
+ title: i18n.t("neetoEditor.menu.file"),
14286
+ description: i18n.t("neetoEditor.menu.attachmentsDescription"),
14287
+ Icon: Attachment,
14288
+ command: neetoCist.noop
14246
14289
  }, {
14247
14290
  optionName: constants.EDITOR_OPTIONS.TODO_LIST,
14248
14291
  title: i18n.t("neetoEditor.menu.todoList"),
14249
14292
  description: i18n.t("neetoEditor.menu.todoListDescription"),
14250
14293
  Icon: Checkbox,
14251
- command: function command(_ref9) {
14252
- var editor = _ref9.editor,
14253
- range = _ref9.range;
14294
+ command: function command(_ref12) {
14295
+ var editor = _ref12.editor,
14296
+ range = _ref12.range;
14254
14297
  editor.chain().focus().deleteRange(range).toggleTaskList().run();
14255
14298
  }
14256
14299
  }, {
@@ -14270,9 +14313,9 @@ var MENU_ITEMS = [{
14270
14313
  title: i18n.t("neetoEditor.menu.blockQuote"),
14271
14314
  description: i18n.t("neetoEditor.menu.blockQuoteDescription"),
14272
14315
  Icon: Blockquote$1,
14273
- command: function command(_ref10) {
14274
- var editor = _ref10.editor,
14275
- range = _ref10.range;
14316
+ command: function command(_ref13) {
14317
+ var editor = _ref13.editor,
14318
+ range = _ref13.range;
14276
14319
  editor.chain().focus().deleteRange(range).toggleBlockquote().run();
14277
14320
  }
14278
14321
  }, {
@@ -14280,9 +14323,9 @@ var MENU_ITEMS = [{
14280
14323
  title: i18n.t("neetoEditor.menu.codeBlock"),
14281
14324
  description: i18n.t("neetoEditor.menu.codeDescription"),
14282
14325
  Icon: CodeBlock$2,
14283
- command: function command(_ref11) {
14284
- var editor = _ref11.editor,
14285
- range = _ref11.range;
14326
+ command: function command(_ref14) {
14327
+ var editor = _ref14.editor,
14328
+ range = _ref14.range;
14286
14329
  editor.chain().focus().deleteRange(range).toggleCodeBlock().run();
14287
14330
  }
14288
14331
  }, {
@@ -14290,9 +14333,9 @@ var MENU_ITEMS = [{
14290
14333
  title: i18n.t("neetoEditor.menu.emoji"),
14291
14334
  description: i18n.t("neetoEditor.menu.emojiDescription"),
14292
14335
  Icon: Smiley,
14293
- command: function command(_ref12) {
14294
- var editor = _ref12.editor,
14295
- range = _ref12.range;
14336
+ command: function command(_ref15) {
14337
+ var editor = _ref15.editor,
14338
+ range = _ref15.range;
14296
14339
  editor.chain().focus().deleteRange(range).insertContent("::").run();
14297
14340
  }
14298
14341
  }, {
@@ -14300,9 +14343,9 @@ var MENU_ITEMS = [{
14300
14343
  title: i18n.t("neetoEditor.menu.divider"),
14301
14344
  description: i18n.t("neetoEditor.menu.dividerDescription"),
14302
14345
  Icon: Minus,
14303
- command: function command(_ref13) {
14304
- var editor = _ref13.editor,
14305
- range = _ref13.range;
14346
+ command: function command(_ref16) {
14347
+ var editor = _ref16.editor,
14348
+ range = _ref16.range;
14306
14349
  editor.chain().focus().deleteRange(range).setHorizontalRule().run();
14307
14350
  }
14308
14351
  }, {
@@ -14316,9 +14359,9 @@ var MENU_ITEMS = [{
14316
14359
  title: i18n.t("neetoEditor.menu.pasteUnformatted"),
14317
14360
  description: i18n.t("neetoEditor.menu.pasteUnformattedDescription"),
14318
14361
  Icon: Notes,
14319
- command: function command(_ref14) {
14320
- var editor = _ref14.editor,
14321
- range = _ref14.range;
14362
+ command: function command(_ref17) {
14363
+ var editor = _ref17.editor,
14364
+ range = _ref17.range;
14322
14365
  return editor.chain().focus().deleteRange(range).pasteUnformatted().run();
14323
14366
  }
14324
14367
  }, {
@@ -14326,21 +14369,95 @@ var MENU_ITEMS = [{
14326
14369
  title: i18n.t("neetoEditor.menu.table"),
14327
14370
  description: i18n.t("neetoEditor.menu.tableDescription"),
14328
14371
  Icon: Column,
14329
- command: function command(_ref15) {
14330
- var editor = _ref15.editor,
14331
- range = _ref15.range;
14372
+ command: function command(_ref18) {
14373
+ var editor = _ref18.editor,
14374
+ range = _ref18.range;
14332
14375
  return editor.chain().focus().deleteRange(range).insertTable({
14333
14376
  rows: 3,
14334
14377
  cols: 3,
14335
14378
  withHeaderRow: true
14336
14379
  }).run();
14337
14380
  }
14381
+ }, {
14382
+ optionName: constants.EDITOR_OPTIONS.CALLOUT,
14383
+ title: i18n.t("neetoEditor.menu.callout"),
14384
+ description: i18n.t("neetoEditor.menu.calloutDescription"),
14385
+ Icon: MessageSquare,
14386
+ command: function command(_ref19) {
14387
+ var editor = _ref19.editor,
14388
+ range = _ref19.range;
14389
+ editor.chain().focus().deleteRange(range).setCallout({
14390
+ type: "default",
14391
+ emoji: "💬"
14392
+ }).run();
14393
+ },
14394
+ items: [{
14395
+ optionName: "".concat(constants.EDITOR_OPTIONS.CALLOUT, "_default"),
14396
+ title: i18n.t("neetoEditor.menu.calloutDefault"),
14397
+ description: i18n.t("neetoEditor.menu.calloutDescription"),
14398
+ command: function command(_ref20) {
14399
+ var editor = _ref20.editor,
14400
+ range = _ref20.range;
14401
+ editor.chain().focus().deleteRange(range).setCallout({
14402
+ type: "default",
14403
+ emoji: "💬"
14404
+ }).run();
14405
+ }
14406
+ }, {
14407
+ optionName: "".concat(constants.EDITOR_OPTIONS.CALLOUT, "_info"),
14408
+ title: i18n.t("neetoEditor.menu.calloutInfo"),
14409
+ description: i18n.t("neetoEditor.menu.calloutDescription"),
14410
+ command: function command(_ref21) {
14411
+ var editor = _ref21.editor,
14412
+ range = _ref21.range;
14413
+ editor.chain().focus().deleteRange(range).setCallout({
14414
+ type: "info",
14415
+ emoji: "ℹ️"
14416
+ }).run();
14417
+ }
14418
+ }, {
14419
+ optionName: "".concat(constants.EDITOR_OPTIONS.CALLOUT, "_warning"),
14420
+ title: i18n.t("neetoEditor.menu.calloutWarning"),
14421
+ description: i18n.t("neetoEditor.menu.calloutDescription"),
14422
+ command: function command(_ref22) {
14423
+ var editor = _ref22.editor,
14424
+ range = _ref22.range;
14425
+ editor.chain().focus().deleteRange(range).setCallout({
14426
+ type: "warning",
14427
+ emoji: "⚠️"
14428
+ }).run();
14429
+ }
14430
+ }, {
14431
+ optionName: "".concat(constants.EDITOR_OPTIONS.CALLOUT, "_error"),
14432
+ title: i18n.t("neetoEditor.menu.calloutError"),
14433
+ description: i18n.t("neetoEditor.menu.calloutDescription"),
14434
+ command: function command(_ref23) {
14435
+ var editor = _ref23.editor,
14436
+ range = _ref23.range;
14437
+ editor.chain().focus().deleteRange(range).setCallout({
14438
+ type: "error",
14439
+ emoji: "❌"
14440
+ }).run();
14441
+ }
14442
+ }, {
14443
+ optionName: "".concat(constants.EDITOR_OPTIONS.CALLOUT, "_success"),
14444
+ title: i18n.t("neetoEditor.menu.calloutSuccess"),
14445
+ description: i18n.t("neetoEditor.menu.calloutDescription"),
14446
+ command: function command(_ref24) {
14447
+ var editor = _ref24.editor,
14448
+ range = _ref24.range;
14449
+ editor.chain().focus().deleteRange(range).setCallout({
14450
+ type: "success",
14451
+ emoji: "✅"
14452
+ }).run();
14453
+ }
14454
+ }]
14338
14455
  }];
14339
14456
  var NO_RESULT_MENU_ITEM = {
14340
14457
  title: i18n.t("neetoEditor.menu.noResults"),
14341
- command: function command(_ref16) {
14342
- var editor = _ref16.editor,
14343
- range = _ref16.range;
14458
+ command: function command(_ref25) {
14459
+ var editor = _ref25.editor,
14460
+ range = _ref25.range;
14344
14461
  editor.chain().focus().deleteRange(range).run();
14345
14462
  }
14346
14463
  };
@@ -14371,11 +14488,29 @@ var videoCommand = function videoCommand(setMediaUploader) {
14371
14488
  editor.chain().focus().deleteRange(range).run();
14372
14489
  };
14373
14490
  };
14374
- var buildCommandItems = function buildCommandItems(_ref4) {
14375
- var options = _ref4.options,
14376
- addonCommands = _ref4.addonCommands,
14377
- setMediaUploader = _ref4.setMediaUploader,
14378
- setIsEmbedModalOpen = _ref4.setIsEmbedModalOpen;
14491
+ var linkCommand = function linkCommand(setIsAddLinkActive) {
14492
+ return function (_ref4) {
14493
+ var editor = _ref4.editor,
14494
+ range = _ref4.range;
14495
+ setIsAddLinkActive(true);
14496
+ editor.chain().focus().deleteRange(range).run();
14497
+ };
14498
+ };
14499
+ var attachmentCommand = function attachmentCommand(attachmentProps) {
14500
+ return function (_ref5) {
14501
+ var editor = _ref5.editor,
14502
+ range = _ref5.range;
14503
+ attachmentProps === null || attachmentProps === void 0 || attachmentProps.handleUploadAttachments();
14504
+ editor.chain().focus().deleteRange(range).run();
14505
+ };
14506
+ };
14507
+ var buildCommandItems = function buildCommandItems(_ref6) {
14508
+ var options = _ref6.options,
14509
+ addonCommands = _ref6.addonCommands,
14510
+ setMediaUploader = _ref6.setMediaUploader,
14511
+ setIsEmbedModalOpen = _ref6.setIsEmbedModalOpen,
14512
+ setIsAddLinkActive = _ref6.setIsAddLinkActive,
14513
+ attachmentProps = _ref6.attachmentProps;
14379
14514
  var commandItems = MENU_ITEMS.map(function (item) {
14380
14515
  if (item.optionName === constants.EDITOR_OPTIONS.IMAGE_UPLOAD) {
14381
14516
  return ramda.assoc("command", imageCommand(setMediaUploader), item);
@@ -14383,11 +14518,15 @@ var buildCommandItems = function buildCommandItems(_ref4) {
14383
14518
  return ramda.assoc("command", videoCommand(setMediaUploader), item);
14384
14519
  } else if (item.optionName === constants.EDITOR_OPTIONS.VIDEO_EMBED) {
14385
14520
  return ramda.assoc("command", embedCommand(setIsEmbedModalOpen), item);
14521
+ } else if (item.optionName === constants.EDITOR_OPTIONS.LINK) {
14522
+ return ramda.assoc("command", linkCommand(setIsAddLinkActive), item);
14523
+ } else if (item.optionName === constants.EDITOR_OPTIONS.ATTACHMENTS) {
14524
+ return ramda.assoc("command", attachmentCommand(attachmentProps), item);
14386
14525
  }
14387
14526
  return item;
14388
14527
  });
14389
- var permittedCommandItems = commandItems.filter(function (_ref5) {
14390
- var optionName = _ref5.optionName;
14528
+ var permittedCommandItems = commandItems.filter(function (_ref7) {
14529
+ var optionName = _ref7.optionName;
14391
14530
  return options.includes(optionName);
14392
14531
  });
14393
14532
  var adddonCommandItems = addonCommands.map(function (command) {
@@ -14407,12 +14546,16 @@ var SlashCommands = {
14407
14546
  var addonCommands = _ref.addonCommands,
14408
14547
  options = _ref.options,
14409
14548
  setMediaUploader = _ref.setMediaUploader,
14410
- setIsEmbedModalOpen = _ref.setIsEmbedModalOpen;
14549
+ setIsEmbedModalOpen = _ref.setIsEmbedModalOpen,
14550
+ setIsAddLinkActive = _ref.setIsAddLinkActive,
14551
+ attachmentProps = _ref.attachmentProps;
14411
14552
  var commandItems = buildCommandItems({
14412
14553
  options: options,
14413
14554
  addonCommands: addonCommands,
14414
14555
  setMediaUploader: setMediaUploader,
14415
- setIsEmbedModalOpen: setIsEmbedModalOpen
14556
+ setIsEmbedModalOpen: setIsEmbedModalOpen,
14557
+ setIsAddLinkActive: setIsAddLinkActive,
14558
+ attachmentProps: attachmentProps
14416
14559
  });
14417
14560
  return Menu$3.Extension.create({
14418
14561
  name: "slash-commands",
@@ -19858,6 +20001,8 @@ var useCustomExtensions = function useCustomExtensions(_ref) {
19858
20001
  isVideoEmbedActive = _ref.isVideoEmbedActive,
19859
20002
  setMediaUploader = _ref.setMediaUploader,
19860
20003
  setIsEmbedModalOpen = _ref.setIsEmbedModalOpen,
20004
+ setIsAddLinkActive = _ref.setIsAddLinkActive,
20005
+ attachmentProps = _ref.attachmentProps,
19861
20006
  openImageInNewTab = _ref.openImageInNewTab,
19862
20007
  openLinkInNewTab = _ref.openLinkInNewTab,
19863
20008
  enableReactNodeViewOptimization = _ref.enableReactNodeViewOptimization,
@@ -19918,7 +20063,9 @@ var useCustomExtensions = function useCustomExtensions(_ref) {
19918
20063
  options: options,
19919
20064
  addonCommands: addonCommands,
19920
20065
  setMediaUploader: setMediaUploader,
19921
- setIsEmbedModalOpen: setIsEmbedModalOpen
20066
+ setIsEmbedModalOpen: setIsEmbedModalOpen,
20067
+ setIsAddLinkActive: setIsAddLinkActive,
20068
+ attachmentProps: attachmentProps
19922
20069
  }));
19923
20070
  }
19924
20071
  if (!ramda.isEmpty(mentions)) {
@@ -20334,7 +20481,7 @@ var Editor = function Editor(_ref, ref) {
20334
20481
  _ref$extensions = _ref.extensions,
20335
20482
  extensions = _ref$extensions === void 0 ? [] : _ref$extensions,
20336
20483
  _ref$hideSlashCommand = _ref.hideSlashCommands,
20337
- hideSlashCommands = _ref$hideSlashCommand === void 0 ? true : _ref$hideSlashCommand,
20484
+ hideSlashCommands = _ref$hideSlashCommand === void 0 ? false : _ref$hideSlashCommand,
20338
20485
  _ref$initialValue = _ref.initialValue,
20339
20486
  initialValue = _ref$initialValue === void 0 ? "" : _ref$initialValue,
20340
20487
  _ref$isCharacterCount = _ref.isCharacterCountActive,
@@ -20394,13 +20541,17 @@ var Editor = function Editor(_ref, ref) {
20394
20541
  _useState4 = _slicedToArray(_useState3, 2),
20395
20542
  isEmbedModalOpen = _useState4[0],
20396
20543
  setIsEmbedModalOpen = _useState4[1];
20397
- var _useState5 = React.useState({
20544
+ var _useState5 = React.useState(false),
20545
+ _useState6 = _slicedToArray(_useState5, 2),
20546
+ isAddLinkActive = _useState6[0],
20547
+ setIsAddLinkActive = _useState6[1];
20548
+ var _useState7 = React.useState({
20398
20549
  image: false,
20399
20550
  video: false
20400
20551
  }),
20401
- _useState6 = _slicedToArray(_useState5, 2),
20402
- mediaUploader = _useState6[0],
20403
- setMediaUploader = _useState6[1];
20552
+ _useState8 = _slicedToArray(_useState7, 2),
20553
+ mediaUploader = _useState8[0],
20554
+ setMediaUploader = _useState8[1];
20404
20555
  var addAttachmentsRef = React.useRef(null);
20405
20556
  var attachmentProps = {
20406
20557
  handleUploadAttachments: function handleUploadAttachments() {
@@ -20433,6 +20584,8 @@ var Editor = function Editor(_ref, ref) {
20433
20584
  isVideoEmbedActive: isVideoEmbedActive,
20434
20585
  setMediaUploader: setMediaUploader,
20435
20586
  setIsEmbedModalOpen: setIsEmbedModalOpen,
20587
+ setIsAddLinkActive: setIsAddLinkActive,
20588
+ attachmentProps: attachmentProps,
20436
20589
  openImageInNewTab: openImageInNewTab,
20437
20590
  openLinkInNewTab: openLinkInNewTab,
20438
20591
  enableReactNodeViewOptimization: enableReactNodeViewOptimization,
@@ -20568,6 +20721,11 @@ var Editor = function Editor(_ref, ref) {
20568
20721
  onChange: onChangeAttachments
20569
20722
  }), (editor === null || editor === void 0 ? void 0 : editor.isActive("link")) && /*#__PURE__*/jsxRuntime.jsx(LinkPopOver, {
20570
20723
  editor: editor
20724
+ }), isAddLinkActive && /*#__PURE__*/jsxRuntime.jsx(Menu$3.LinkAddPopOver, {
20725
+ editor: editor,
20726
+ isAddLinkActive: isAddLinkActive,
20727
+ openLinkInNewTab: openLinkInNewTab,
20728
+ setIsAddLinkActive: setIsAddLinkActive
20571
20729
  }), /*#__PURE__*/jsxRuntime.jsx(TableActionMenu, {
20572
20730
  editor: editor,
20573
20731
  appendTo: wrapperRef