@bigbinary/neeto-editor 1.37.0 → 1.38.0
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 +635 -43
- package/dist/Editor.js.map +1 -1
- package/dist/FormikEditor.js +1 -1
- package/dist/Menu.js +1 -1
- package/dist/{chunk-0da548f5.js → chunk-2e46d1cd.js} +2 -2
- package/dist/{chunk-0da548f5.js.map → chunk-2e46d1cd.js.map} +1 -1
- package/dist/cjs/Editor.cjs.js +805 -212
- package/dist/cjs/Editor.cjs.js.map +1 -1
- package/dist/cjs/FormikEditor.cjs.js +1 -1
- package/dist/cjs/Menu.cjs.js +1 -1
- package/dist/cjs/{chunk-b40b9bbf.cjs.js → chunk-cdd8edb9.cjs.js} +3 -1
- package/dist/cjs/{chunk-b40b9bbf.cjs.js.map → chunk-cdd8edb9.cjs.js.map} +1 -1
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/editor-stats.html +1 -1
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/Editor.js
CHANGED
|
@@ -3,16 +3,16 @@ import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
|
3
3
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
4
4
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
5
5
|
import * as React from 'react';
|
|
6
|
-
import React__default, { useEffect, useState, useRef, useCallback, useImperativeHandle } from 'react';
|
|
7
|
-
import { E as Extension, a as Mark, m as mergeAttributes, b as markInputRule, c as markPasteRule, g as getMarkAttributes, N as Node, D as DecorationSet, d as Decoration, w as wrappingInputRule, t as textblockTypeInputRule, k as keydownHandler, e as callOrReturn, f as getExtensionField, n as nodeInputRule, h as findChildren, i as NodeViewWrapper, j as NodeViewContent, R as ReactNodeViewRenderer, P as PasteRule, v as validateUrl, l as escapeForRegEx, o as ReactRenderer, p as EmojiPickerMenu, q as emojiPickerApi, r as combineTransactionSteps, s as getChangedRanges, u as findChildrenInRange, x as getMarksBetween, y as getAttributes, I as InputRule, z as
|
|
6
|
+
import React__default, { useEffect, useState, useRef, forwardRef, useCallback, useImperativeHandle } from 'react';
|
|
7
|
+
import { E as Extension, a as Mark, m as mergeAttributes, b as markInputRule, c as markPasteRule, g as getMarkAttributes, N as Node, D as DecorationSet, d as Decoration, w as wrappingInputRule, t as textblockTypeInputRule, k as keydownHandler, e as callOrReturn, f as getExtensionField, n as nodeInputRule, h as findChildren, i as NodeViewWrapper, j as NodeViewContent, R as ReactNodeViewRenderer, P as PasteRule, v as validateUrl, l as escapeForRegEx, o as ReactRenderer, p as EmojiPickerMenu, q as emojiPickerApi, r as combineTransactionSteps, s as getChangedRanges, u as findChildrenInRange, x as getMarksBetween, y as getAttributes, I as InputRule, z as highlightFocussedNode, A as resetFocussedNode, B as findParentNodeClosestToPos, C as BubbleMenu, F as getLinkPopoverPosition, G as getMarkType, H as getMarkRange, J as useEditor, M as Menu$4, K as EditorContent, L as MediaUploader, O as EmbedOption, Q as EditorView } from './chunk-2e46d1cd.js';
|
|
8
8
|
import classnames from 'classnames';
|
|
9
9
|
import { C as COMBINED_REGEX, D as DIRECT_UPLOAD_ENDPOINT, E as EDITOR_OPTIONS } from './chunk-edd8b9fe.js';
|
|
10
10
|
import { isNotPresent, isNotEmpty, isPresent, noop as noop$1, slugify } from '@bigbinary/neeto-cist';
|
|
11
11
|
import { Dropdown, Input, Button, Spinner, Modal, Toastr, Avatar, Typography, Checkbox, Label } from '@bigbinary/neetoui';
|
|
12
|
-
import { is, isNil, mergeRight, isEmpty as isEmpty$1, equals } from 'ramda';
|
|
12
|
+
import { is, isNil, mergeRight, isEmpty as isEmpty$1, assoc, equals } from 'ramda';
|
|
13
13
|
import { n } from './chunk-15c449f1.js';
|
|
14
14
|
import { P as Plugin, b as PluginKey, T as TextSelection, d as dropPoint, S as Selection, N as NodeSelection, F as Fragment, c as Slice, M as Mapping, e as SelectionRange, f as Transform, L as LINK_VALIDATION_SCHEMA, v as validateAndFormatUrl, g as getEditorStyles, h as clipboardTextParser, s as setInitialPosition, D as DEFAULT_EDITOR_OPTIONS } from './chunk-e876ad10.js';
|
|
15
|
-
import { Down, MenuHorizontal, Close } from '@bigbinary/neeto-icons';
|
|
15
|
+
import { Down, MenuHorizontal, Close, Paragraph as Paragraph$1, TextH1, TextH2, Text as Text$2, ListNumber, ListDot, ImageUpload, Video, Blockquote as Blockquote$1, CodeBlock as CodeBlock$2, Smiley, Minus, MediaVideo, Notes, Column } from '@bigbinary/neeto-icons';
|
|
16
16
|
import CopyToClipboardButton from '@bigbinary/neeto-molecules/CopyToClipboardButton';
|
|
17
17
|
import { useTranslation } from 'react-i18next';
|
|
18
18
|
import { l as lowlight } from './chunk-ade4c9e3.js';
|
|
@@ -31,6 +31,7 @@ import { t } from 'i18next';
|
|
|
31
31
|
import { globalProps } from '@bigbinary/neeto-commons-frontend/initializers';
|
|
32
32
|
import _extends from '@babel/runtime/helpers/extends';
|
|
33
33
|
import { M as MARGIN_HEIGHT } from './chunk-5bc5e361.js';
|
|
34
|
+
import Tippy from '@tippyjs/react';
|
|
34
35
|
import { useOnClickOutside } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
35
36
|
import { Form, Input as Input$1 } from '@bigbinary/neetoui/formik';
|
|
36
37
|
import { A as Attachments } from './chunk-df79506a.js';
|
|
@@ -40,7 +41,6 @@ import 'axios';
|
|
|
40
41
|
import 'react-colorful';
|
|
41
42
|
import '@bigbinary/neeto-molecules/DynamicVariables';
|
|
42
43
|
import './chunk-65f73e5a.js';
|
|
43
|
-
import '@tippyjs/react';
|
|
44
44
|
import 'yup';
|
|
45
45
|
|
|
46
46
|
var ErrorWrapper = function ErrorWrapper(_ref) {
|
|
@@ -5683,8 +5683,8 @@ const CodeBlockLowlight = CodeBlock$1.extend({
|
|
|
5683
5683
|
|
|
5684
5684
|
var SORTED_LANGUAGE_LIST = [].concat(_toConsumableArray(lowlight.listLanguages()), ["html"]).sort();
|
|
5685
5685
|
|
|
5686
|
-
var Menu$
|
|
5687
|
-
MenuItem = Dropdown.MenuItem;
|
|
5686
|
+
var Menu$3 = Dropdown.Menu,
|
|
5687
|
+
MenuItem$1 = Dropdown.MenuItem;
|
|
5688
5688
|
var CodeBlockComponent = function CodeBlockComponent(_ref) {
|
|
5689
5689
|
var _node$attrs3, _node$content;
|
|
5690
5690
|
var node = _ref.node,
|
|
@@ -5744,10 +5744,10 @@ var CodeBlockComponent = function CodeBlockComponent(_ref) {
|
|
|
5744
5744
|
e.preventDefault();
|
|
5745
5745
|
e.stopPropagation();
|
|
5746
5746
|
}
|
|
5747
|
-
}), /*#__PURE__*/React__default.createElement(Menu$
|
|
5747
|
+
}), /*#__PURE__*/React__default.createElement(Menu$3, {
|
|
5748
5748
|
className: "neeto-editor-codeblock-options__menu"
|
|
5749
5749
|
}, filteredAndSortedLanguageList.map(function (language) {
|
|
5750
|
-
return /*#__PURE__*/React__default.createElement(MenuItem.Button, {
|
|
5750
|
+
return /*#__PURE__*/React__default.createElement(MenuItem$1.Button, {
|
|
5751
5751
|
key: language,
|
|
5752
5752
|
onClick: function onClick() {
|
|
5753
5753
|
return handleLanguageSelect(language);
|
|
@@ -6626,7 +6626,7 @@ var Resizable = /** @class */ (function (_super) {
|
|
|
6626
6626
|
return Resizable;
|
|
6627
6627
|
}(React.PureComponent));
|
|
6628
6628
|
|
|
6629
|
-
var Menu$
|
|
6629
|
+
var Menu$2 = function Menu(_ref) {
|
|
6630
6630
|
var align = _ref.align,
|
|
6631
6631
|
editor = _ref.editor,
|
|
6632
6632
|
updateAttributes = _ref.updateAttributes,
|
|
@@ -6703,7 +6703,7 @@ var EmbedComponent = function EmbedComponent(_ref) {
|
|
|
6703
6703
|
width: width
|
|
6704
6704
|
},
|
|
6705
6705
|
onResizeStop: handleResize
|
|
6706
|
-
}, /*#__PURE__*/React__default.createElement(Menu$
|
|
6706
|
+
}, /*#__PURE__*/React__default.createElement(Menu$2, {
|
|
6707
6707
|
align: align,
|
|
6708
6708
|
deleteNode: deleteNode,
|
|
6709
6709
|
editor: editor,
|
|
@@ -6711,8 +6711,8 @@ var EmbedComponent = function EmbedComponent(_ref) {
|
|
|
6711
6711
|
}), /*#__PURE__*/React__default.createElement("iframe", node.attrs)));
|
|
6712
6712
|
};
|
|
6713
6713
|
|
|
6714
|
-
function ownKeys$
|
|
6715
|
-
function _objectSpread$
|
|
6714
|
+
function ownKeys$b(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6715
|
+
function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$b(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$b(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6716
6716
|
var Embeds = Node.create({
|
|
6717
6717
|
name: "external-video",
|
|
6718
6718
|
addOptions: function addOptions() {
|
|
@@ -6782,7 +6782,7 @@ var Embeds = Node.create({
|
|
|
6782
6782
|
}, ["div", {
|
|
6783
6783
|
"class": "neeto-editor__video-iframe",
|
|
6784
6784
|
style: "width: ".concat(figwidth, "px; height: ").concat(figheight, "px;")
|
|
6785
|
-
}, ["iframe", mergeAttributes(this.options.HTMLAttributes, _objectSpread$
|
|
6785
|
+
}, ["iframe", mergeAttributes(this.options.HTMLAttributes, _objectSpread$b({}, HTMLAttributes))]]];
|
|
6786
6786
|
},
|
|
6787
6787
|
addNodeView: function addNodeView() {
|
|
6788
6788
|
return ReactNodeViewRenderer(EmbedComponent);
|
|
@@ -7053,8 +7053,8 @@ function Suggestion({ pluginKey = SuggestionPluginKey, editor, char = '@', allow
|
|
|
7053
7053
|
return plugin;
|
|
7054
7054
|
}
|
|
7055
7055
|
|
|
7056
|
-
function ownKeys$
|
|
7057
|
-
function _objectSpread$
|
|
7056
|
+
function ownKeys$a(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7057
|
+
function _objectSpread$a(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$a(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$a(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7058
7058
|
var EmojiPickerPluginKey = new PluginKey("emoji-picker");
|
|
7059
7059
|
var EmojiPicker = Node.create({
|
|
7060
7060
|
name: "emojiPicker",
|
|
@@ -7108,7 +7108,7 @@ var EmojiPicker = Node.create({
|
|
|
7108
7108
|
};
|
|
7109
7109
|
},
|
|
7110
7110
|
addProseMirrorPlugins: function addProseMirrorPlugins() {
|
|
7111
|
-
return [Suggestion(_objectSpread$
|
|
7111
|
+
return [Suggestion(_objectSpread$a({
|
|
7112
7112
|
editor: this.editor
|
|
7113
7113
|
}, this.options.suggestion))];
|
|
7114
7114
|
}
|
|
@@ -7134,8 +7134,8 @@ var filterEmojiSuggestions = function filterEmojiSuggestions(suggestions, freque
|
|
|
7134
7134
|
}).slice(0, 5);
|
|
7135
7135
|
};
|
|
7136
7136
|
|
|
7137
|
-
function _callSuper$
|
|
7138
|
-
function _isNativeReflectConstruct$
|
|
7137
|
+
function _callSuper$3(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$3() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
7138
|
+
function _isNativeReflectConstruct$3() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$3 = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
7139
7139
|
var EmojiSuggestionMenu = /*#__PURE__*/function (_React$Component) {
|
|
7140
7140
|
function EmojiSuggestionMenu() {
|
|
7141
7141
|
var _this;
|
|
@@ -7143,7 +7143,7 @@ var EmojiSuggestionMenu = /*#__PURE__*/function (_React$Component) {
|
|
|
7143
7143
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
7144
7144
|
args[_key] = arguments[_key];
|
|
7145
7145
|
}
|
|
7146
|
-
_this = _callSuper$
|
|
7146
|
+
_this = _callSuper$3(this, EmojiSuggestionMenu, [].concat(args));
|
|
7147
7147
|
_defineProperty(_this, "state", {
|
|
7148
7148
|
isLoading: false,
|
|
7149
7149
|
selectedIndex: 0,
|
|
@@ -7322,8 +7322,8 @@ var EmojiSuggestionMenu = /*#__PURE__*/function (_React$Component) {
|
|
|
7322
7322
|
}]);
|
|
7323
7323
|
}(React__default.Component);
|
|
7324
7324
|
|
|
7325
|
-
function ownKeys$
|
|
7326
|
-
function _objectSpread$
|
|
7325
|
+
function ownKeys$9(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7326
|
+
function _objectSpread$9(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$9(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$9(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7327
7327
|
var EmojiSuggestionPluginKey = new PluginKey("emoji-suggestion");
|
|
7328
7328
|
var EmojiSuggestion = Node.create({
|
|
7329
7329
|
name: "emojiSuggestion",
|
|
@@ -7402,7 +7402,7 @@ var EmojiSuggestion = Node.create({
|
|
|
7402
7402
|
};
|
|
7403
7403
|
},
|
|
7404
7404
|
addProseMirrorPlugins: function addProseMirrorPlugins() {
|
|
7405
|
-
return [Suggestion(_objectSpread$
|
|
7405
|
+
return [Suggestion(_objectSpread$9({
|
|
7406
7406
|
editor: this.editor
|
|
7407
7407
|
}, this.options.suggestion))];
|
|
7408
7408
|
}
|
|
@@ -7516,8 +7516,8 @@ var ImagePreviewModal = function ImagePreviewModal(_ref) {
|
|
|
7516
7516
|
})));
|
|
7517
7517
|
};
|
|
7518
7518
|
|
|
7519
|
-
function ownKeys$
|
|
7520
|
-
function _objectSpread$
|
|
7519
|
+
function ownKeys$8(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7520
|
+
function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$8(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$8(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7521
7521
|
var ImageComponent = function ImageComponent(_ref) {
|
|
7522
7522
|
var _node$content, _figureRef$current;
|
|
7523
7523
|
var node = _ref.node,
|
|
@@ -7567,7 +7567,7 @@ var ImageComponent = function ImageComponent(_ref) {
|
|
|
7567
7567
|
"data-cy": "neeto-editor-image-wrapper"
|
|
7568
7568
|
}, /*#__PURE__*/React__default.createElement("figure", {
|
|
7569
7569
|
ref: figureRef
|
|
7570
|
-
}, /*#__PURE__*/React__default.createElement(Menu$
|
|
7570
|
+
}, /*#__PURE__*/React__default.createElement(Menu$2, {
|
|
7571
7571
|
align: align,
|
|
7572
7572
|
deleteNode: deleteNode,
|
|
7573
7573
|
editor: editor,
|
|
@@ -7584,7 +7584,7 @@ var ImageComponent = function ImageComponent(_ref) {
|
|
|
7584
7584
|
onResize: function onResize(_event, _direction, ref) {
|
|
7585
7585
|
return setCaptionWidth(ref.offsetWidth);
|
|
7586
7586
|
}
|
|
7587
|
-
}, /*#__PURE__*/React__default.createElement("img", _extends({}, _objectSpread$
|
|
7587
|
+
}, /*#__PURE__*/React__default.createElement("img", _extends({}, _objectSpread$8(_objectSpread$8({}, node.attrs), {}, {
|
|
7588
7588
|
src: src
|
|
7589
7589
|
}), {
|
|
7590
7590
|
alt: caption,
|
|
@@ -7836,8 +7836,8 @@ var FigCaption = Node.create({
|
|
|
7836
7836
|
}
|
|
7837
7837
|
});
|
|
7838
7838
|
|
|
7839
|
-
function ownKeys$
|
|
7840
|
-
function _objectSpread$
|
|
7839
|
+
function ownKeys$7(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7840
|
+
function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$7(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$7(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7841
7841
|
var KeyboardShortcuts = function KeyboardShortcuts(_ref) {
|
|
7842
7842
|
var onSubmit = _ref.onSubmit,
|
|
7843
7843
|
shortcuts = _ref.shortcuts,
|
|
@@ -7846,7 +7846,7 @@ var KeyboardShortcuts = function KeyboardShortcuts(_ref) {
|
|
|
7846
7846
|
name: "keyboard-shortcuts",
|
|
7847
7847
|
addKeyboardShortcuts: function addKeyboardShortcuts() {
|
|
7848
7848
|
var _this = this;
|
|
7849
|
-
return _objectSpread$
|
|
7849
|
+
return _objectSpread$7({
|
|
7850
7850
|
"Mod-Enter": function ModEnter() {
|
|
7851
7851
|
onSubmit === null || onSubmit === void 0 || onSubmit(_this.editor.getHTML());
|
|
7852
7852
|
return true;
|
|
@@ -9940,8 +9940,8 @@ const Link$1 = Mark.create({
|
|
|
9940
9940
|
|
|
9941
9941
|
var LINK_MARKDOWN_INPUT_REGEX = /(?:^|\s)\[([^\]]*)?\]\((\S+)(?: ["“](.+)["”])?\)$/i;
|
|
9942
9942
|
|
|
9943
|
-
function ownKeys$
|
|
9944
|
-
function _objectSpread$
|
|
9943
|
+
function ownKeys$6(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9944
|
+
function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$6(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$6(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9945
9945
|
var linkInputRule = function linkInputRule(config) {
|
|
9946
9946
|
var defaultMarkInputRule = markInputRule(config);
|
|
9947
9947
|
return new InputRule({
|
|
@@ -9957,7 +9957,7 @@ var Link = Link$1.extend({
|
|
|
9957
9957
|
inclusive: false,
|
|
9958
9958
|
addAttributes: function addAttributes() {
|
|
9959
9959
|
var _this$parent;
|
|
9960
|
-
return _objectSpread$
|
|
9960
|
+
return _objectSpread$6(_objectSpread$6({}, (_this$parent = this.parent) === null || _this$parent === void 0 ? void 0 : _this$parent.call(this)), {}, {
|
|
9961
9961
|
title: {
|
|
9962
9962
|
"default": null
|
|
9963
9963
|
}
|
|
@@ -10180,13 +10180,13 @@ var scrollHandler = function scrollHandler(_ref) {
|
|
|
10180
10180
|
wrapperRef.current.scrollTop = scrollPosition;
|
|
10181
10181
|
};
|
|
10182
10182
|
|
|
10183
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10184
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10183
|
+
function _callSuper$2(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$2() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10184
|
+
function _isNativeReflectConstruct$2() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$2 = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10185
10185
|
var MentionList = /*#__PURE__*/function (_React$Component) {
|
|
10186
10186
|
function MentionList(props) {
|
|
10187
10187
|
var _this;
|
|
10188
10188
|
_classCallCheck(this, MentionList);
|
|
10189
|
-
_this = _callSuper(this, MentionList, [props]);
|
|
10189
|
+
_this = _callSuper$2(this, MentionList, [props]);
|
|
10190
10190
|
_defineProperty(_this, "selectItem", function (index) {
|
|
10191
10191
|
var _this$props = _this.props,
|
|
10192
10192
|
items = _this$props.items,
|
|
@@ -10321,8 +10321,8 @@ var createMentionSuggestions = function createMentionSuggestions() {
|
|
|
10321
10321
|
};
|
|
10322
10322
|
|
|
10323
10323
|
var _excluded$3 = ["suggestion"];
|
|
10324
|
-
function ownKeys$
|
|
10325
|
-
function _objectSpread$
|
|
10324
|
+
function ownKeys$5(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10325
|
+
function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$5(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$5(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10326
10326
|
var suggestion$1 = {
|
|
10327
10327
|
render: function render() {
|
|
10328
10328
|
var reactRenderer;
|
|
@@ -10398,8 +10398,8 @@ var Mention = {
|
|
|
10398
10398
|
var _ref3$suggestion = _ref3.suggestion,
|
|
10399
10399
|
suggestionConfig = _ref3$suggestion === void 0 ? {} : _ref3$suggestion,
|
|
10400
10400
|
otherConfig = _objectWithoutProperties(_ref3, _excluded$3);
|
|
10401
|
-
return Mentions.configure(_objectSpread$
|
|
10402
|
-
suggestion: _objectSpread$
|
|
10401
|
+
return Mentions.configure(_objectSpread$5(_objectSpread$5({}, otherConfig), {}, {
|
|
10402
|
+
suggestion: _objectSpread$5(_objectSpread$5({}, suggestion$1), suggestionConfig)
|
|
10403
10403
|
}));
|
|
10404
10404
|
}
|
|
10405
10405
|
};
|
|
@@ -10497,6 +10497,579 @@ var SelectionDecoration = Document.extend({
|
|
|
10497
10497
|
}
|
|
10498
10498
|
});
|
|
10499
10499
|
|
|
10500
|
+
function _callSuper$1(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$1() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10501
|
+
function _isNativeReflectConstruct$1() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$1 = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10502
|
+
var Menu$1 = /*#__PURE__*/function (_React$Component) {
|
|
10503
|
+
function Menu(props) {
|
|
10504
|
+
var _this;
|
|
10505
|
+
_classCallCheck(this, Menu);
|
|
10506
|
+
_this = _callSuper$1(this, Menu, [props]);
|
|
10507
|
+
_defineProperty(_this, "keydownHandler", function (event) {
|
|
10508
|
+
var listeners = {
|
|
10509
|
+
Enter: _this.enterHandler,
|
|
10510
|
+
ArrowUp: _this.upHandler,
|
|
10511
|
+
ArrowDown: _this.downHandler,
|
|
10512
|
+
ArrowLeft: _this.leftArrowHandler,
|
|
10513
|
+
ArrowRight: _this.rightArrowHandler
|
|
10514
|
+
};
|
|
10515
|
+
if (event.key in listeners) listeners[event.key](event);
|
|
10516
|
+
});
|
|
10517
|
+
_defineProperty(_this, "selectItem", function (index) {
|
|
10518
|
+
var _this$props = _this.props,
|
|
10519
|
+
items = _this$props.items,
|
|
10520
|
+
editor = _this$props.editor,
|
|
10521
|
+
range = _this$props.range;
|
|
10522
|
+
var selectedItem = items[index];
|
|
10523
|
+
var hasCommand = selectedItem && selectedItem.command;
|
|
10524
|
+
var isLeafNode = isNotPresent(selectedItem.items);
|
|
10525
|
+
if (hasCommand && isLeafNode) selectedItem.command({
|
|
10526
|
+
editor: editor,
|
|
10527
|
+
range: range
|
|
10528
|
+
});
|
|
10529
|
+
});
|
|
10530
|
+
_defineProperty(_this, "upHandler", function () {
|
|
10531
|
+
var items = _this.props.items;
|
|
10532
|
+
var selectedIndex = _this.state.selectedIndex;
|
|
10533
|
+
_this.setState({
|
|
10534
|
+
selectedIndex: (selectedIndex + items.length - 1) % items.length
|
|
10535
|
+
});
|
|
10536
|
+
});
|
|
10537
|
+
_defineProperty(_this, "downHandler", function () {
|
|
10538
|
+
var items = _this.props.items;
|
|
10539
|
+
var selectedIndex = _this.state.selectedIndex;
|
|
10540
|
+
_this.setState({
|
|
10541
|
+
selectedIndex: (selectedIndex + 1) % items.length
|
|
10542
|
+
});
|
|
10543
|
+
});
|
|
10544
|
+
_defineProperty(_this, "enterHandler", function () {
|
|
10545
|
+
var selectedIndex = _this.state.selectedIndex;
|
|
10546
|
+
_this.selectItem(selectedIndex);
|
|
10547
|
+
});
|
|
10548
|
+
_defineProperty(_this, "leftArrowHandler", function () {
|
|
10549
|
+
var _this$props2 = _this.props,
|
|
10550
|
+
menuIndex = _this$props2.menuIndex,
|
|
10551
|
+
setActiveMenuIndex = _this$props2.setActiveMenuIndex;
|
|
10552
|
+
if (menuIndex > 0) setActiveMenuIndex(menuIndex - 1);
|
|
10553
|
+
});
|
|
10554
|
+
_defineProperty(_this, "rightArrowHandler", function () {
|
|
10555
|
+
var _this$props3 = _this.props,
|
|
10556
|
+
menuIndex = _this$props3.menuIndex,
|
|
10557
|
+
setActiveMenuIndex = _this$props3.setActiveMenuIndex,
|
|
10558
|
+
items = _this$props3.items;
|
|
10559
|
+
var selectedIndex = _this.state.selectedIndex;
|
|
10560
|
+
var selectedItem = items[selectedIndex];
|
|
10561
|
+
var hasSubItems = selectedItem && !isNotPresent(selectedItem.items);
|
|
10562
|
+
if (hasSubItems) setActiveMenuIndex(menuIndex + 1);
|
|
10563
|
+
});
|
|
10564
|
+
_this.state = {
|
|
10565
|
+
selectedIndex: 0
|
|
10566
|
+
};
|
|
10567
|
+
_this.menuRef = /*#__PURE__*/React__default.createRef();
|
|
10568
|
+
return _this;
|
|
10569
|
+
}
|
|
10570
|
+
_inherits(Menu, _React$Component);
|
|
10571
|
+
return _createClass(Menu, [{
|
|
10572
|
+
key: "componentDidMount",
|
|
10573
|
+
value: function componentDidMount() {
|
|
10574
|
+
var _this$props4 = this.props,
|
|
10575
|
+
menuIndex = _this$props4.menuIndex,
|
|
10576
|
+
activeMenuIndex = _this$props4.activeMenuIndex;
|
|
10577
|
+
var isCurrentMenuActive = menuIndex === activeMenuIndex;
|
|
10578
|
+
if (isCurrentMenuActive) {
|
|
10579
|
+
document.addEventListener("keydown", this.keydownHandler);
|
|
10580
|
+
}
|
|
10581
|
+
}
|
|
10582
|
+
}, {
|
|
10583
|
+
key: "componentWillUnmount",
|
|
10584
|
+
value: function componentWillUnmount() {
|
|
10585
|
+
document.removeEventListener("keydown", this.keydownHandler);
|
|
10586
|
+
}
|
|
10587
|
+
}, {
|
|
10588
|
+
key: "componentDidUpdate",
|
|
10589
|
+
value: function componentDidUpdate(oldProps) {
|
|
10590
|
+
var _this$props5 = this.props,
|
|
10591
|
+
items = _this$props5.items,
|
|
10592
|
+
menuIndex = _this$props5.menuIndex,
|
|
10593
|
+
activeMenuIndex = _this$props5.activeMenuIndex;
|
|
10594
|
+
var isCurrentMenuActive = menuIndex === activeMenuIndex;
|
|
10595
|
+
if (items !== oldProps.items) this.setState({
|
|
10596
|
+
selectedIndex: 0
|
|
10597
|
+
});
|
|
10598
|
+
scrollHandler({
|
|
10599
|
+
wrapperRef: this.menuRef,
|
|
10600
|
+
index: this.state.selectedIndex
|
|
10601
|
+
});
|
|
10602
|
+
if (isCurrentMenuActive) {
|
|
10603
|
+
document.addEventListener("keydown", this.keydownHandler);
|
|
10604
|
+
} else document.removeEventListener("keydown", this.keydownHandler);
|
|
10605
|
+
}
|
|
10606
|
+
}, {
|
|
10607
|
+
key: "render",
|
|
10608
|
+
value: function render() {
|
|
10609
|
+
var _this2 = this;
|
|
10610
|
+
var _this$props6 = this.props,
|
|
10611
|
+
items = _this$props6.items,
|
|
10612
|
+
menuIndex = _this$props6.menuIndex,
|
|
10613
|
+
activeMenuIndex = _this$props6.activeMenuIndex;
|
|
10614
|
+
var selectedIndex = this.state.selectedIndex;
|
|
10615
|
+
var isCurrentMenuActive = menuIndex === activeMenuIndex;
|
|
10616
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10617
|
+
className: "neeto-editor-slash-commands__wrapper",
|
|
10618
|
+
ref: this.menuRef
|
|
10619
|
+
}, items.map(function (item, index) {
|
|
10620
|
+
var isLeafNode = isNotPresent(item.items);
|
|
10621
|
+
var nodeElement = /*#__PURE__*/React__default.createElement(MenuItem, {
|
|
10622
|
+
index: index,
|
|
10623
|
+
item: item,
|
|
10624
|
+
key: item.title,
|
|
10625
|
+
selectItem: function selectItem() {
|
|
10626
|
+
return isLeafNode && _this2.selectItem(index);
|
|
10627
|
+
},
|
|
10628
|
+
selectedIndex: isCurrentMenuActive ? selectedIndex : -1,
|
|
10629
|
+
onHover: function onHover() {
|
|
10630
|
+
return _this2.setState({
|
|
10631
|
+
selectedIndex: index
|
|
10632
|
+
});
|
|
10633
|
+
}
|
|
10634
|
+
});
|
|
10635
|
+
if (isLeafNode) return nodeElement;
|
|
10636
|
+
return /*#__PURE__*/React__default.createElement(Tippy, {
|
|
10637
|
+
interactive: true,
|
|
10638
|
+
key: item.title,
|
|
10639
|
+
placement: "right",
|
|
10640
|
+
visible: selectedIndex === index,
|
|
10641
|
+
content: /*#__PURE__*/React__default.createElement(Menu, _extends({}, _this2.props, {
|
|
10642
|
+
items: item.items,
|
|
10643
|
+
menuIndex: menuIndex + 1
|
|
10644
|
+
})),
|
|
10645
|
+
onCreate: function onCreate(_ref) {
|
|
10646
|
+
var popper = _ref.popper;
|
|
10647
|
+
return popper.style.width = "max-content";
|
|
10648
|
+
},
|
|
10649
|
+
onHide: function onHide() {
|
|
10650
|
+
_this2.isSubmenuOpened = false;
|
|
10651
|
+
},
|
|
10652
|
+
onShow: function onShow() {
|
|
10653
|
+
_this2.isSubmenuOpened = true;
|
|
10654
|
+
}
|
|
10655
|
+
}, nodeElement);
|
|
10656
|
+
}));
|
|
10657
|
+
}
|
|
10658
|
+
}]);
|
|
10659
|
+
}(React__default.Component); // eslint-disable-next-line react/display-name
|
|
10660
|
+
var MenuItem = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
10661
|
+
var item = _ref2.item,
|
|
10662
|
+
selectedIndex = _ref2.selectedIndex,
|
|
10663
|
+
index = _ref2.index,
|
|
10664
|
+
selectItem = _ref2.selectItem,
|
|
10665
|
+
onHover = _ref2.onHover;
|
|
10666
|
+
var Icon = item.Icon;
|
|
10667
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10668
|
+
"data-cy": "neeto-editor-command-list-item-".concat(index),
|
|
10669
|
+
ref: ref,
|
|
10670
|
+
className: classnames("neeto-editor-slash-commands__item", {
|
|
10671
|
+
active: index === selectedIndex
|
|
10672
|
+
}),
|
|
10673
|
+
onClick: selectItem,
|
|
10674
|
+
onMouseEnter: onHover
|
|
10675
|
+
}, Icon && /*#__PURE__*/React__default.createElement(Icon, {
|
|
10676
|
+
size: 20
|
|
10677
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10678
|
+
className: "neeto-editor-slash-commands__item-content"
|
|
10679
|
+
}, /*#__PURE__*/React__default.createElement("h5", {
|
|
10680
|
+
"data-cy": "neeto-editor-command-list-item-block-heading"
|
|
10681
|
+
}, item.title), /*#__PURE__*/React__default.createElement("p", {
|
|
10682
|
+
"data-cy": "neeto-editor-command-list-item-block-description"
|
|
10683
|
+
}, item.description)));
|
|
10684
|
+
});
|
|
10685
|
+
|
|
10686
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10687
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10688
|
+
var CommandsList = /*#__PURE__*/function (_React$Component) {
|
|
10689
|
+
function CommandsList() {
|
|
10690
|
+
var _this;
|
|
10691
|
+
_classCallCheck(this, CommandsList);
|
|
10692
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
10693
|
+
args[_key] = arguments[_key];
|
|
10694
|
+
}
|
|
10695
|
+
_this = _callSuper(this, CommandsList, [].concat(args));
|
|
10696
|
+
_defineProperty(_this, "state", {
|
|
10697
|
+
activeMenuIndex: 0
|
|
10698
|
+
});
|
|
10699
|
+
_defineProperty(_this, "onKeyDown", function (_ref) {
|
|
10700
|
+
var event = _ref.event;
|
|
10701
|
+
return ["Enter", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].includes(event.key);
|
|
10702
|
+
});
|
|
10703
|
+
_defineProperty(_this, "setActiveMenuIndex", function (index) {
|
|
10704
|
+
return _this.setState({
|
|
10705
|
+
activeMenuIndex: index
|
|
10706
|
+
});
|
|
10707
|
+
});
|
|
10708
|
+
return _this;
|
|
10709
|
+
}
|
|
10710
|
+
_inherits(CommandsList, _React$Component);
|
|
10711
|
+
return _createClass(CommandsList, [{
|
|
10712
|
+
key: "render",
|
|
10713
|
+
value: function render() {
|
|
10714
|
+
return /*#__PURE__*/React__default.createElement(Menu$1, _extends({}, this.props, {
|
|
10715
|
+
activeMenuIndex: this.state.activeMenuIndex,
|
|
10716
|
+
items: this.props.items,
|
|
10717
|
+
menuIndex: 0,
|
|
10718
|
+
setActiveMenuIndex: this.setActiveMenuIndex
|
|
10719
|
+
}));
|
|
10720
|
+
}
|
|
10721
|
+
}]);
|
|
10722
|
+
}(React__default.Component);
|
|
10723
|
+
|
|
10724
|
+
var MENU_ITEMS = [{
|
|
10725
|
+
optionName: EDITOR_OPTIONS.PARAGRAPH,
|
|
10726
|
+
title: t("neetoEditor.menu.normalText"),
|
|
10727
|
+
description: t("neetoEditor.menu.normalTextDescription"),
|
|
10728
|
+
Icon: Paragraph$1,
|
|
10729
|
+
command: function command(_ref) {
|
|
10730
|
+
var editor = _ref.editor,
|
|
10731
|
+
range = _ref.range;
|
|
10732
|
+
editor.chain().focus().deleteRange(range).setNode("paragraph").run();
|
|
10733
|
+
}
|
|
10734
|
+
}, {
|
|
10735
|
+
optionName: EDITOR_OPTIONS.H1,
|
|
10736
|
+
title: t("neetoEditor.menu.h1"),
|
|
10737
|
+
description: t("neetoEditor.menu.h1Description"),
|
|
10738
|
+
Icon: TextH1,
|
|
10739
|
+
command: function command(_ref2) {
|
|
10740
|
+
var editor = _ref2.editor,
|
|
10741
|
+
range = _ref2.range;
|
|
10742
|
+
editor.chain().focus().deleteRange(range).setNode("heading", {
|
|
10743
|
+
level: 1
|
|
10744
|
+
}).run();
|
|
10745
|
+
}
|
|
10746
|
+
}, {
|
|
10747
|
+
optionName: EDITOR_OPTIONS.H2,
|
|
10748
|
+
title: t("neetoEditor.menu.h2"),
|
|
10749
|
+
description: t("neetoEditor.menu.h2Description"),
|
|
10750
|
+
Icon: TextH2,
|
|
10751
|
+
command: function command(_ref3) {
|
|
10752
|
+
var editor = _ref3.editor,
|
|
10753
|
+
range = _ref3.range;
|
|
10754
|
+
editor.chain().focus().deleteRange(range).setNode("heading", {
|
|
10755
|
+
level: 2
|
|
10756
|
+
}).run();
|
|
10757
|
+
}
|
|
10758
|
+
}, {
|
|
10759
|
+
optionName: EDITOR_OPTIONS.H3,
|
|
10760
|
+
title: t("neetoEditor.menu.h3"),
|
|
10761
|
+
description: t("neetoEditor.menu.h3Description"),
|
|
10762
|
+
Icon: Text$2,
|
|
10763
|
+
command: function command(_ref4) {
|
|
10764
|
+
var editor = _ref4.editor,
|
|
10765
|
+
range = _ref4.range;
|
|
10766
|
+
editor.chain().focus().deleteRange(range).setNode("heading", {
|
|
10767
|
+
level: 3
|
|
10768
|
+
}).run();
|
|
10769
|
+
}
|
|
10770
|
+
}, {
|
|
10771
|
+
optionName: EDITOR_OPTIONS.H4,
|
|
10772
|
+
title: t("neetoEditor.menu.h4"),
|
|
10773
|
+
description: t("neetoEditor.menu.h4Description"),
|
|
10774
|
+
Icon: Text$2,
|
|
10775
|
+
command: function command(_ref5) {
|
|
10776
|
+
var editor = _ref5.editor,
|
|
10777
|
+
range = _ref5.range;
|
|
10778
|
+
editor.chain().focus().deleteRange(range).setNode("heading", {
|
|
10779
|
+
level: 4
|
|
10780
|
+
}).run();
|
|
10781
|
+
}
|
|
10782
|
+
}, {
|
|
10783
|
+
optionName: EDITOR_OPTIONS.H5,
|
|
10784
|
+
title: t("neetoEditor.menu.h5"),
|
|
10785
|
+
description: t("neetoEditor.menu.h5Description"),
|
|
10786
|
+
Icon: Text$2,
|
|
10787
|
+
command: function command(_ref6) {
|
|
10788
|
+
var editor = _ref6.editor,
|
|
10789
|
+
range = _ref6.range;
|
|
10790
|
+
editor.chain().focus().deleteRange(range).setNode("heading", {
|
|
10791
|
+
level: 5
|
|
10792
|
+
}).run();
|
|
10793
|
+
}
|
|
10794
|
+
}, {
|
|
10795
|
+
optionName: EDITOR_OPTIONS.H6,
|
|
10796
|
+
title: t("neetoEditor.menu.h6"),
|
|
10797
|
+
description: t("neetoEditor.menu.h6Description"),
|
|
10798
|
+
Icon: Text$2,
|
|
10799
|
+
command: function command(_ref7) {
|
|
10800
|
+
var editor = _ref7.editor,
|
|
10801
|
+
range = _ref7.range;
|
|
10802
|
+
editor.chain().focus().deleteRange(range).setNode("heading", {
|
|
10803
|
+
level: 6
|
|
10804
|
+
}).run();
|
|
10805
|
+
}
|
|
10806
|
+
}, {
|
|
10807
|
+
optionName: EDITOR_OPTIONS.LIST_ORDERED,
|
|
10808
|
+
title: t("neetoEditor.menu.numberedList"),
|
|
10809
|
+
description: t("neetoEditor.menu.numberedListDescription"),
|
|
10810
|
+
Icon: ListNumber,
|
|
10811
|
+
command: function command(_ref8) {
|
|
10812
|
+
var editor = _ref8.editor,
|
|
10813
|
+
range = _ref8.range;
|
|
10814
|
+
editor.chain().focus().deleteRange(range).toggleOrderedList().run();
|
|
10815
|
+
}
|
|
10816
|
+
}, {
|
|
10817
|
+
optionName: EDITOR_OPTIONS.LIST_BULLETS,
|
|
10818
|
+
title: t("neetoEditor.menu.bulletList"),
|
|
10819
|
+
description: t("neetoEditor.menu.bulletListDescription"),
|
|
10820
|
+
Icon: ListDot,
|
|
10821
|
+
command: function command(_ref9) {
|
|
10822
|
+
var editor = _ref9.editor,
|
|
10823
|
+
range = _ref9.range;
|
|
10824
|
+
editor.chain().focus().deleteRange(range).toggleBulletList().run();
|
|
10825
|
+
}
|
|
10826
|
+
}, {
|
|
10827
|
+
optionName: EDITOR_OPTIONS.IMAGE_UPLOAD,
|
|
10828
|
+
title: t("neetoEditor.menu.image"),
|
|
10829
|
+
description: t("neetoEditor.menu.imageDescription"),
|
|
10830
|
+
Icon: ImageUpload,
|
|
10831
|
+
command: noop$1
|
|
10832
|
+
}, {
|
|
10833
|
+
optionName: EDITOR_OPTIONS.VIDEO_UPLOAD,
|
|
10834
|
+
title: t("neetoEditor.menu.video"),
|
|
10835
|
+
description: t("neetoEditor.menu.videoDescription"),
|
|
10836
|
+
Icon: Video,
|
|
10837
|
+
command: noop$1
|
|
10838
|
+
}, {
|
|
10839
|
+
optionName: EDITOR_OPTIONS.BLOCKQUOTE,
|
|
10840
|
+
title: t("neetoEditor.menu.blockQuote"),
|
|
10841
|
+
description: t("neetoEditor.menu.blockQuoteDescription"),
|
|
10842
|
+
Icon: Blockquote$1,
|
|
10843
|
+
command: function command(_ref10) {
|
|
10844
|
+
var editor = _ref10.editor,
|
|
10845
|
+
range = _ref10.range;
|
|
10846
|
+
editor.chain().focus().deleteRange(range).toggleBlockquote().run();
|
|
10847
|
+
}
|
|
10848
|
+
}, {
|
|
10849
|
+
optionName: EDITOR_OPTIONS.CODE_BLOCK,
|
|
10850
|
+
title: t("neetoEditor.menu.codeBlock"),
|
|
10851
|
+
description: t("neetoEditor.menu.codeDescription"),
|
|
10852
|
+
Icon: CodeBlock$2,
|
|
10853
|
+
command: function command(_ref11) {
|
|
10854
|
+
var editor = _ref11.editor,
|
|
10855
|
+
range = _ref11.range;
|
|
10856
|
+
editor.chain().focus().deleteRange(range).toggleCodeBlock().run();
|
|
10857
|
+
}
|
|
10858
|
+
}, {
|
|
10859
|
+
optionName: EDITOR_OPTIONS.EMOJI,
|
|
10860
|
+
title: t("neetoEditor.menu.emoji"),
|
|
10861
|
+
description: t("neetoEditor.menu.emojiDescription"),
|
|
10862
|
+
Icon: Smiley,
|
|
10863
|
+
command: function command(_ref12) {
|
|
10864
|
+
var editor = _ref12.editor,
|
|
10865
|
+
range = _ref12.range;
|
|
10866
|
+
editor.chain().focus().deleteRange(range).insertContent("::").run();
|
|
10867
|
+
}
|
|
10868
|
+
}, {
|
|
10869
|
+
optionName: EDITOR_OPTIONS.DIVIDER,
|
|
10870
|
+
title: t("neetoEditor.menu.divider"),
|
|
10871
|
+
description: t("neetoEditor.menu.dividerDescription"),
|
|
10872
|
+
Icon: Minus,
|
|
10873
|
+
command: function command(_ref13) {
|
|
10874
|
+
var editor = _ref13.editor,
|
|
10875
|
+
range = _ref13.range;
|
|
10876
|
+
editor.chain().focus().deleteRange(range).setHorizontalRule().run();
|
|
10877
|
+
}
|
|
10878
|
+
}, {
|
|
10879
|
+
optionName: EDITOR_OPTIONS.VIDEO_EMBED,
|
|
10880
|
+
title: t("neetoEditor.menu.embed"),
|
|
10881
|
+
description: t("neetoEditor.menu.embedDescription"),
|
|
10882
|
+
Icon: MediaVideo,
|
|
10883
|
+
command: noop$1
|
|
10884
|
+
}, {
|
|
10885
|
+
optionName: EDITOR_OPTIONS.PASTE_UNFORMATTED,
|
|
10886
|
+
title: t("neetoEditor.menu.pasteUnformatted"),
|
|
10887
|
+
description: t("neetoEditor.menu.pasteUnformattedDescription"),
|
|
10888
|
+
Icon: Notes,
|
|
10889
|
+
command: function command(_ref14) {
|
|
10890
|
+
var editor = _ref14.editor,
|
|
10891
|
+
range = _ref14.range;
|
|
10892
|
+
return editor.chain().focus().deleteRange(range).pasteUnformatted().run();
|
|
10893
|
+
}
|
|
10894
|
+
}, {
|
|
10895
|
+
optionName: EDITOR_OPTIONS.TABLE,
|
|
10896
|
+
title: t("neetoEditor.menu.table"),
|
|
10897
|
+
description: t("neetoEditor.menu.tableDescription"),
|
|
10898
|
+
Icon: Column,
|
|
10899
|
+
command: function command(_ref15) {
|
|
10900
|
+
var editor = _ref15.editor,
|
|
10901
|
+
range = _ref15.range;
|
|
10902
|
+
return editor.chain().focus().deleteRange(range).insertTable({
|
|
10903
|
+
rows: 3,
|
|
10904
|
+
cols: 3,
|
|
10905
|
+
withHeaderRow: true
|
|
10906
|
+
}).run();
|
|
10907
|
+
}
|
|
10908
|
+
}];
|
|
10909
|
+
var NO_RESULT_MENU_ITEM = {
|
|
10910
|
+
title: t("neetoEditor.menu.noResults"),
|
|
10911
|
+
command: function command(_ref16) {
|
|
10912
|
+
var editor = _ref16.editor,
|
|
10913
|
+
range = _ref16.range;
|
|
10914
|
+
editor.chain().focus().deleteRange(range).run();
|
|
10915
|
+
}
|
|
10916
|
+
};
|
|
10917
|
+
|
|
10918
|
+
var embedCommand = function embedCommand(setIsEmbedModalOpen) {
|
|
10919
|
+
return function (_ref) {
|
|
10920
|
+
var editor = _ref.editor,
|
|
10921
|
+
range = _ref.range;
|
|
10922
|
+
setIsEmbedModalOpen(true);
|
|
10923
|
+
editor.chain().focus().deleteRange(range).run();
|
|
10924
|
+
};
|
|
10925
|
+
};
|
|
10926
|
+
var imageCommand = function imageCommand(setMediaUploader) {
|
|
10927
|
+
return function (_ref2) {
|
|
10928
|
+
var editor = _ref2.editor,
|
|
10929
|
+
range = _ref2.range;
|
|
10930
|
+
setMediaUploader(assoc("image", true));
|
|
10931
|
+
editor.chain().focus().deleteRange(range).run();
|
|
10932
|
+
};
|
|
10933
|
+
};
|
|
10934
|
+
var videoCommand = function videoCommand(setMediaUploader) {
|
|
10935
|
+
return function (_ref3) {
|
|
10936
|
+
var editor = _ref3.editor,
|
|
10937
|
+
range = _ref3.range;
|
|
10938
|
+
setMediaUploader(assoc("video", true));
|
|
10939
|
+
editor.chain().focus().deleteRange(range).run();
|
|
10940
|
+
};
|
|
10941
|
+
};
|
|
10942
|
+
var buildCommandItems = function buildCommandItems(_ref4) {
|
|
10943
|
+
var options = _ref4.options,
|
|
10944
|
+
addonCommands = _ref4.addonCommands,
|
|
10945
|
+
setMediaUploader = _ref4.setMediaUploader,
|
|
10946
|
+
setIsEmbedModalOpen = _ref4.setIsEmbedModalOpen;
|
|
10947
|
+
var commandItems = MENU_ITEMS.map(function (item) {
|
|
10948
|
+
if (item.optionName === EDITOR_OPTIONS.IMAGE_UPLOAD) {
|
|
10949
|
+
return assoc("command", imageCommand(setMediaUploader), item);
|
|
10950
|
+
} else if (item.optionName === EDITOR_OPTIONS.VIDEO_UPLOAD) {
|
|
10951
|
+
return assoc("command", videoCommand(setMediaUploader), item);
|
|
10952
|
+
} else if (item.optionName === EDITOR_OPTIONS.VIDEO_EMBED) {
|
|
10953
|
+
return assoc("command", embedCommand(setIsEmbedModalOpen), item);
|
|
10954
|
+
}
|
|
10955
|
+
return item;
|
|
10956
|
+
});
|
|
10957
|
+
var permittedCommandItems = commandItems.filter(function (_ref5) {
|
|
10958
|
+
var optionName = _ref5.optionName;
|
|
10959
|
+
return options.includes(optionName);
|
|
10960
|
+
});
|
|
10961
|
+
return [].concat(_toConsumableArray(permittedCommandItems), _toConsumableArray(addonCommands));
|
|
10962
|
+
};
|
|
10963
|
+
|
|
10964
|
+
function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10965
|
+
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10966
|
+
var CommandsPluginKey = new PluginKey("commands");
|
|
10967
|
+
var SlashCommands = {
|
|
10968
|
+
configure: function configure(_ref) {
|
|
10969
|
+
var addonCommands = _ref.addonCommands,
|
|
10970
|
+
options = _ref.options,
|
|
10971
|
+
setMediaUploader = _ref.setMediaUploader,
|
|
10972
|
+
setIsEmbedModalOpen = _ref.setIsEmbedModalOpen;
|
|
10973
|
+
var commandItems = buildCommandItems({
|
|
10974
|
+
options: options,
|
|
10975
|
+
addonCommands: addonCommands,
|
|
10976
|
+
setMediaUploader: setMediaUploader,
|
|
10977
|
+
setIsEmbedModalOpen: setIsEmbedModalOpen
|
|
10978
|
+
});
|
|
10979
|
+
return Extension.create({
|
|
10980
|
+
name: "slash-commands",
|
|
10981
|
+
addOptions: function addOptions() {
|
|
10982
|
+
return {
|
|
10983
|
+
HTMLAttributes: {
|
|
10984
|
+
"class": "commands"
|
|
10985
|
+
},
|
|
10986
|
+
suggestion: {
|
|
10987
|
+
"char": "/",
|
|
10988
|
+
startOfLine: false,
|
|
10989
|
+
pluginKey: CommandsPluginKey,
|
|
10990
|
+
command: function command(_ref2) {
|
|
10991
|
+
var editor = _ref2.editor,
|
|
10992
|
+
range = _ref2.range,
|
|
10993
|
+
props = _ref2.props;
|
|
10994
|
+
props.command({
|
|
10995
|
+
editor: editor,
|
|
10996
|
+
range: range
|
|
10997
|
+
});
|
|
10998
|
+
},
|
|
10999
|
+
items: function items(_ref3) {
|
|
11000
|
+
var query = _ref3.query;
|
|
11001
|
+
var filteredItems = commandItems.filter(function (_ref4) {
|
|
11002
|
+
var title = _ref4.title;
|
|
11003
|
+
return title.toLowerCase().includes(query.toLowerCase());
|
|
11004
|
+
});
|
|
11005
|
+
return isEmpty$1(filteredItems) ? [NO_RESULT_MENU_ITEM] : filteredItems;
|
|
11006
|
+
},
|
|
11007
|
+
render: function render() {
|
|
11008
|
+
var reactRenderer;
|
|
11009
|
+
var popup;
|
|
11010
|
+
return {
|
|
11011
|
+
onStart: function onStart(props) {
|
|
11012
|
+
if (props.editor.isActive("image") || props.editor.isActive("codeBlock")) {
|
|
11013
|
+
return;
|
|
11014
|
+
}
|
|
11015
|
+
reactRenderer = new ReactRenderer(CommandsList, {
|
|
11016
|
+
props: props,
|
|
11017
|
+
editor: props.editor
|
|
11018
|
+
});
|
|
11019
|
+
popup = tippy("body", {
|
|
11020
|
+
getReferenceClientRect: props.clientRect,
|
|
11021
|
+
appendTo: function appendTo() {
|
|
11022
|
+
return document.body;
|
|
11023
|
+
},
|
|
11024
|
+
content: reactRenderer.element,
|
|
11025
|
+
showOnCreate: true,
|
|
11026
|
+
interactive: true,
|
|
11027
|
+
trigger: "manual",
|
|
11028
|
+
placement: "bottom-start",
|
|
11029
|
+
arrow: false,
|
|
11030
|
+
zIndex: 99999,
|
|
11031
|
+
role: "dropdown",
|
|
11032
|
+
theme: "neeto-editor-slash-menu"
|
|
11033
|
+
});
|
|
11034
|
+
highlightFocussedNode();
|
|
11035
|
+
},
|
|
11036
|
+
onUpdate: function onUpdate(props) {
|
|
11037
|
+
var _reactRenderer;
|
|
11038
|
+
if (props.editor.isActive("image") || props.editor.isActive("codeBlock")) {
|
|
11039
|
+
return;
|
|
11040
|
+
}
|
|
11041
|
+
(_reactRenderer = reactRenderer) === null || _reactRenderer === void 0 || _reactRenderer.updateProps(props);
|
|
11042
|
+
popup[0].setProps({
|
|
11043
|
+
getReferenceClientRect: props.clientRect
|
|
11044
|
+
});
|
|
11045
|
+
},
|
|
11046
|
+
onKeyDown: function onKeyDown(props) {
|
|
11047
|
+
var _reactRenderer2;
|
|
11048
|
+
if (props.event.key === "Escape") {
|
|
11049
|
+
popup[0].hide();
|
|
11050
|
+
return true;
|
|
11051
|
+
}
|
|
11052
|
+
return reactRenderer && ((_reactRenderer2 = reactRenderer) === null || _reactRenderer2 === void 0 || (_reactRenderer2 = _reactRenderer2.ref) === null || _reactRenderer2 === void 0 ? void 0 : _reactRenderer2.onKeyDown(props));
|
|
11053
|
+
},
|
|
11054
|
+
onExit: function onExit() {
|
|
11055
|
+
popup && popup[0].destroy();
|
|
11056
|
+
reactRenderer && reactRenderer.destroy();
|
|
11057
|
+
resetFocussedNode();
|
|
11058
|
+
}
|
|
11059
|
+
};
|
|
11060
|
+
}
|
|
11061
|
+
}
|
|
11062
|
+
};
|
|
11063
|
+
},
|
|
11064
|
+
addProseMirrorPlugins: function addProseMirrorPlugins() {
|
|
11065
|
+
return [Suggestion(_objectSpread$4({
|
|
11066
|
+
editor: this.editor
|
|
11067
|
+
}, this.options.suggestion))];
|
|
11068
|
+
}
|
|
11069
|
+
});
|
|
11070
|
+
}
|
|
11071
|
+
};
|
|
11072
|
+
|
|
10500
11073
|
var _excluded$2 = ["suggestion"];
|
|
10501
11074
|
function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10502
11075
|
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -13443,7 +14016,7 @@ var VideoComponent = function VideoComponent(_ref) {
|
|
|
13443
14016
|
};
|
|
13444
14017
|
return /*#__PURE__*/React__default.createElement(NodeViewWrapper, {
|
|
13445
14018
|
className: "neeto-editor__image-wrapper neeto-editor__image--".concat(align)
|
|
13446
|
-
}, /*#__PURE__*/React__default.createElement("figure", null, /*#__PURE__*/React__default.createElement(Menu$
|
|
14019
|
+
}, /*#__PURE__*/React__default.createElement("figure", null, /*#__PURE__*/React__default.createElement(Menu$2, {
|
|
13447
14020
|
align: align,
|
|
13448
14021
|
deleteNode: deleteNode,
|
|
13449
14022
|
editor: editor,
|
|
@@ -13604,10 +14177,14 @@ var useCustomExtensions = function useCustomExtensions(_ref) {
|
|
|
13604
14177
|
extensions = _ref.extensions,
|
|
13605
14178
|
mentions = _ref.mentions,
|
|
13606
14179
|
variables = _ref.variables,
|
|
14180
|
+
isSlashCommandsActive = _ref.isSlashCommandsActive,
|
|
13607
14181
|
options = _ref.options,
|
|
14182
|
+
addonCommands = _ref.addonCommands,
|
|
13608
14183
|
onSubmit = _ref.onSubmit,
|
|
13609
14184
|
keyboardShortcuts = _ref.keyboardShortcuts,
|
|
13610
14185
|
isVideoEmbedActive = _ref.isVideoEmbedActive,
|
|
14186
|
+
setMediaUploader = _ref.setMediaUploader,
|
|
14187
|
+
setIsEmbedModalOpen = _ref.setIsEmbedModalOpen,
|
|
13611
14188
|
openImageInNewTab = _ref.openImageInNewTab,
|
|
13612
14189
|
openLinkInNewTab = _ref.openLinkInNewTab;
|
|
13613
14190
|
var customExtensions = [CharacterCount, Code, CodeBlock, CustomCommands, Document, EmojiSuggestion$1, EmojiPicker, FigCaption, HighlightInternal, SelectionDecoration, FocusClasses.configure({
|
|
@@ -13643,6 +14220,14 @@ var useCustomExtensions = function useCustomExtensions(_ref) {
|
|
|
13643
14220
|
if (options.includes(EDITOR_OPTIONS.TEXT_COLOR)) {
|
|
13644
14221
|
customExtensions.push(Color);
|
|
13645
14222
|
}
|
|
14223
|
+
if (isSlashCommandsActive) {
|
|
14224
|
+
customExtensions.push(SlashCommands.configure({
|
|
14225
|
+
options: options,
|
|
14226
|
+
addonCommands: addonCommands,
|
|
14227
|
+
setMediaUploader: setMediaUploader,
|
|
14228
|
+
setIsEmbedModalOpen: setIsEmbedModalOpen
|
|
14229
|
+
}));
|
|
14230
|
+
}
|
|
13646
14231
|
if (!isEmpty$1(mentions)) {
|
|
13647
14232
|
var items = createMentionSuggestions(mentions);
|
|
13648
14233
|
customExtensions.push(Mention.configure({
|
|
@@ -13989,7 +14574,7 @@ var LinkPopOver = function LinkPopOver(_ref) {
|
|
|
13989
14574
|
}, isEditing ? renderEditingMode() : renderViewMode())) : null, document.body);
|
|
13990
14575
|
};
|
|
13991
14576
|
|
|
13992
|
-
var _excluded = ["addonCommands", "addons", "attachments", "attachmentsConfig", "autoFocus", "className", "contentClassName", "errorWrapperClassName", "contentAttributes", "menuClassName", "attachmentsClassName", "isMenuIndependent", "defaults", "editorSecrets", "error", "extensions", "initialValue", "isCharacterCountActive", "keyboardShortcuts", "label", "mentions", "menuType", "placeholder", "required", "rows", "tooltips", "variables", "onChange", "onFocus", "onBlur", "onSubmit", "onChangeAttachments", "children", "openImageInNewTab", "openLinkInNewTab"];
|
|
14577
|
+
var _excluded = ["addonCommands", "addons", "attachments", "attachmentsConfig", "autoFocus", "className", "contentClassName", "errorWrapperClassName", "contentAttributes", "menuClassName", "attachmentsClassName", "isMenuIndependent", "defaults", "editorSecrets", "error", "extensions", "hideSlashCommands", "initialValue", "isCharacterCountActive", "keyboardShortcuts", "label", "mentions", "menuType", "placeholder", "required", "rows", "tooltips", "variables", "onChange", "onFocus", "onBlur", "onSubmit", "onChangeAttachments", "children", "openImageInNewTab", "openLinkInNewTab"];
|
|
13993
14578
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13994
14579
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13995
14580
|
var Editor = function Editor(_ref, ref) {
|
|
@@ -14020,6 +14605,8 @@ var Editor = function Editor(_ref, ref) {
|
|
|
14020
14605
|
error = _ref$error === void 0 ? null : _ref$error,
|
|
14021
14606
|
_ref$extensions = _ref.extensions,
|
|
14022
14607
|
extensions = _ref$extensions === void 0 ? [] : _ref$extensions,
|
|
14608
|
+
_ref$hideSlashCommand = _ref.hideSlashCommands,
|
|
14609
|
+
hideSlashCommands = _ref$hideSlashCommand === void 0 ? true : _ref$hideSlashCommand,
|
|
14023
14610
|
_ref$initialValue = _ref.initialValue,
|
|
14024
14611
|
initialValue = _ref$initialValue === void 0 ? "" : _ref$initialValue,
|
|
14025
14612
|
_ref$isCharacterCount = _ref.isCharacterCountActive,
|
|
@@ -14067,6 +14654,7 @@ var Editor = function Editor(_ref, ref) {
|
|
|
14067
14654
|
var isMediaUploaderActive = addons.includes(EDITOR_OPTIONS.IMAGE_UPLOAD) || addons.includes(EDITOR_OPTIONS.VIDEO_UPLOAD);
|
|
14068
14655
|
var isFixedMenuActive = menuType === "fixed";
|
|
14069
14656
|
var isBubbleMenuActive = menuType === "bubble";
|
|
14657
|
+
var isSlashCommandsActive = !hideSlashCommands || isBubbleMenuActive;
|
|
14070
14658
|
var isPlaceholderActive = !!placeholder;
|
|
14071
14659
|
var _useState3 = useState(false),
|
|
14072
14660
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
@@ -14092,10 +14680,14 @@ var Editor = function Editor(_ref, ref) {
|
|
|
14092
14680
|
extensions: extensions,
|
|
14093
14681
|
mentions: mentions,
|
|
14094
14682
|
variables: variables,
|
|
14683
|
+
isSlashCommandsActive: isSlashCommandsActive,
|
|
14095
14684
|
options: [].concat(_toConsumableArray(defaults), _toConsumableArray(addons)),
|
|
14685
|
+
addonCommands: addonCommands,
|
|
14096
14686
|
onSubmit: onSubmit,
|
|
14097
14687
|
keyboardShortcuts: keyboardShortcuts,
|
|
14098
14688
|
isVideoEmbedActive: isVideoEmbedActive,
|
|
14689
|
+
setMediaUploader: setMediaUploader,
|
|
14690
|
+
setIsEmbedModalOpen: setIsEmbedModalOpen,
|
|
14099
14691
|
openImageInNewTab: openImageInNewTab,
|
|
14100
14692
|
openLinkInNewTab: openLinkInNewTab
|
|
14101
14693
|
});
|
|
@@ -14175,7 +14767,7 @@ var Editor = function Editor(_ref, ref) {
|
|
|
14175
14767
|
}, /*#__PURE__*/React__default.createElement(CharacterCountWrapper, {
|
|
14176
14768
|
editor: editor,
|
|
14177
14769
|
isActive: isCharacterCountActive
|
|
14178
|
-
}, /*#__PURE__*/React__default.createElement(Menu$
|
|
14770
|
+
}, /*#__PURE__*/React__default.createElement(Menu$4, {
|
|
14179
14771
|
addonCommands: addonCommands,
|
|
14180
14772
|
addons: addons,
|
|
14181
14773
|
attachmentProps: attachmentProps,
|