@bigbinary/neeto-editor 1.47.40 → 1.47.41

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.
@@ -13418,6 +13418,7 @@ var Placeholder = Menu$3.Extension.create({
13418
13418
  emptyEditorClass: "is-editor-empty",
13419
13419
  emptyNodeClass: "is-empty",
13420
13420
  placeholder: i18n.t("neetoEditor.placeholders.writeSomething"),
13421
+ slashCommandsPlaceholder: i18n.t("neetoEditor.placeholders.writeSlashForCommands"),
13421
13422
  showOnlyWhenEditable: true,
13422
13423
  showOnlyCurrent: false,
13423
13424
  includeChildren: false
@@ -13442,12 +13443,16 @@ var Placeholder = Menu$3.Extension.create({
13442
13443
  var isExcluded = _this.options.excludeNodeTypes.includes(node.type.name);
13443
13444
  if ((hasAnchor || !_this.options.showOnlyCurrent) && !isExcluded && isEmpty) {
13444
13445
  var classes = [_this.options.emptyNodeClass];
13446
+ var placeholderText = _this.options.placeholder;
13445
13447
  if (_this.editor.isEmpty) {
13446
13448
  classes.push(_this.options.emptyEditorClass);
13449
+ if (_this.options.isSlashCommandsActive && !_this.options.placeholder) {
13450
+ placeholderText = _this.options.slashCommandsPlaceholder;
13451
+ }
13447
13452
  }
13448
13453
  var decoration = Menu$3.Decoration.node(pos, pos + node.nodeSize, {
13449
13454
  "class": classes.join(" "),
13450
- "data-placeholder": _this.options.placeholder
13455
+ "data-placeholder": placeholderText
13451
13456
  });
13452
13457
  decorations.push(decoration);
13453
13458
  }
@@ -19722,7 +19727,8 @@ var useCustomExtensions = function useCustomExtensions(_ref) {
19722
19727
  target: openLinkInNewTab ? "_blank" : null
19723
19728
  }
19724
19729
  }), Placeholder.configure({
19725
- placeholder: placeholder
19730
+ placeholder: placeholder,
19731
+ isSlashCommandsActive: isSlashCommandsActive
19726
19732
  }), StarterKit.configure({
19727
19733
  document: false,
19728
19734
  codeBlock: false,
@@ -20239,7 +20245,7 @@ var Editor = function Editor(_ref, ref) {
20239
20245
  var isFixedMenuActive = menuType === "fixed";
20240
20246
  var isBubbleMenuActive = menuType === "bubble";
20241
20247
  var isSlashCommandsActive = !hideSlashCommands || isBubbleMenuActive && !hideSlashCommands;
20242
- var isPlaceholderActive = !!placeholder;
20248
+ var isPlaceholderActive = !!placeholder || isSlashCommandsActive;
20243
20249
  var _useState3 = React.useState(false),
20244
20250
  _useState4 = _slicedToArray(_useState3, 2),
20245
20251
  isAddLinkActive = _useState4[0],