@bigbinary/neeto-editor 1.47.39 → 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.
- package/dist/Editor.js +9 -3
- package/dist/Editor.js.map +1 -1
- package/dist/cjs/Editor.cjs.js +9 -3
- package/dist/cjs/Editor.cjs.js.map +1 -1
- package/dist/editor-stats.html +1 -1
- package/package.json +3 -1
- package/src/translations/ar.json +2 -1
- package/src/translations/bg.json +2 -1
- package/src/translations/ca.json +2 -1
- package/src/translations/cs.json +2 -1
- package/src/translations/da.json +2 -1
- package/src/translations/de.json +2 -1
- package/src/translations/en.json +1 -0
- package/src/translations/es-MX.json +2 -1
- package/src/translations/es.json +2 -1
- package/src/translations/et.json +2 -1
- package/src/translations/fi.json +2 -1
- package/src/translations/fil.json +2 -1
- package/src/translations/fr.json +2 -1
- package/src/translations/hi.json +2 -1
- package/src/translations/hr.json +2 -1
- package/src/translations/id.json +2 -1
- package/src/translations/it.json +2 -1
- package/src/translations/ja.json +2 -1
- package/src/translations/ko.json +2 -1
- package/src/translations/nl.json +2 -1
- package/src/translations/pl.json +2 -1
- package/src/translations/pt-BR.json +2 -1
- package/src/translations/pt.json +2 -1
- package/src/translations/ro.json +2 -1
- package/src/translations/ru.json +2 -1
- package/src/translations/sk.json +2 -1
- package/src/translations/sl.json +2 -1
- package/src/translations/sv.json +2 -1
- package/src/translations/th.json +2 -1
- package/src/translations/tr.json +2 -1
- package/src/translations/uk.json +2 -1
- package/src/translations/vi.json +2 -1
- package/src/translations/zh-CN.json +2 -1
- package/src/translations/zh-TW.json +2 -1
package/dist/cjs/Editor.cjs.js
CHANGED
|
@@ -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":
|
|
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],
|