@elliemae/ds-wysiwygeditor 2.0.0-next.0 → 2.0.0-next.13

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.
Files changed (43) hide show
  1. package/cjs/DSWYSIWYGEditor.js +9 -6
  2. package/cjs/components/CustomImageUploader.js +15 -12
  3. package/cjs/components/CustomToolbar.js +122 -151
  4. package/cjs/components/DSWYSIWYGEditorImpl.js +21 -4
  5. package/cjs/components/ImageLibraryModal.js +5 -0
  6. package/cjs/components/InsertFieldModal.js +8 -1
  7. package/cjs/components/TippedButton.js +55 -0
  8. package/cjs/components/TippedSelect.js +45 -0
  9. package/cjs/components/colors.js +7 -3
  10. package/cjs/components/customFields.js +14 -7
  11. package/cjs/constants.js +1 -0
  12. package/cjs/index.js +0 -2
  13. package/cjs/quillMatchers/clipboardLinkWithTagMatcher.js +33 -0
  14. package/cjs/quillOverrides/IndentStyle.js +2 -2
  15. package/cjs/quillOverrides/LinkFormat.js +5 -4
  16. package/cjs/quillOverrides/PlainClipboard.js +3 -1
  17. package/cjs/utils.js +5 -1
  18. package/esm/DSWYSIWYGEditor.js +9 -6
  19. package/esm/components/CustomImageUploader.js +13 -9
  20. package/esm/components/CustomToolbar.js +119 -142
  21. package/esm/components/DSWYSIWYGEditorImpl.js +21 -4
  22. package/esm/components/ImageLibraryModal.js +5 -0
  23. package/esm/components/InsertFieldModal.js +8 -1
  24. package/esm/components/TippedButton.js +45 -0
  25. package/esm/components/TippedSelect.js +37 -0
  26. package/esm/components/colors.js +7 -3
  27. package/esm/components/customFields.js +14 -7
  28. package/esm/constants.js +1 -0
  29. package/esm/index.js +1 -1
  30. package/esm/quillMatchers/clipboardLinkWithTagMatcher.js +29 -0
  31. package/esm/quillOverrides/IndentStyle.js +2 -2
  32. package/esm/quillOverrides/LinkFormat.js +5 -4
  33. package/esm/quillOverrides/PlainClipboard.js +3 -1
  34. package/esm/utils.js +5 -1
  35. package/package.json +23 -8
  36. package/types/DSWYSIWYGEditor.d.ts +2 -0
  37. package/types/components/CustomImageUploader.d.ts +3 -1
  38. package/types/components/CustomToolbar.d.ts +3 -17
  39. package/types/components/TippedButton.d.ts +12 -0
  40. package/types/components/TippedSelect.d.ts +13 -0
  41. package/types/quillMatchers/clipboardLinkWithTagMatcher.d.ts +1 -0
  42. package/cjs/package.json +0 -7
  43. package/esm/package.json +0 -7
@@ -0,0 +1,55 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ require('core-js/modules/esnext.async-iterator.filter.js');
6
+ require('core-js/modules/esnext.iterator.constructor.js');
7
+ require('core-js/modules/esnext.iterator.filter.js');
8
+ require('core-js/modules/esnext.async-iterator.for-each.js');
9
+ require('core-js/modules/esnext.iterator.for-each.js');
10
+ var _jsx = require('@babel/runtime/helpers/jsx');
11
+ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
12
+ var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
13
+ require('react');
14
+ var dsTooltip = require('@elliemae/ds-tooltip');
15
+ var jsxRuntime = require('react/jsx-runtime');
16
+
17
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
18
+
19
+ var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
20
+ var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
21
+ var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
22
+
23
+ const _excluded = ["className", "tip", "children", "onClick", "zIndex"];
24
+
25
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
26
+
27
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
28
+ const TippedButton = _ref => {
29
+ let {
30
+ className,
31
+ tip,
32
+ children,
33
+ onClick = () => null,
34
+ zIndex = 1
35
+ } = _ref,
36
+ rest = _objectWithoutProperties__default["default"](_ref, _excluded);
37
+
38
+ return /*#__PURE__*/_jsx__default["default"]("div", {
39
+ className: "tooltip"
40
+ }, void 0, /*#__PURE__*/_jsx__default["default"](dsTooltip.DSTooltipV3, {
41
+ text: tip,
42
+ zIndex: zIndex
43
+ }, void 0, /*#__PURE__*/jsxRuntime.jsx("button", _objectSpread(_objectSpread({
44
+ type: "button",
45
+ className: className,
46
+ onClick: e => {
47
+ e.preventDefault();
48
+ onClick(e);
49
+ }
50
+ }, rest), {}, {
51
+ children: children
52
+ }))));
53
+ };
54
+
55
+ exports.TippedButton = TippedButton;
@@ -0,0 +1,45 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var _jsx = require('@babel/runtime/helpers/jsx');
6
+ require('core-js/modules/web.dom-collections.iterator.js');
7
+ require('core-js/modules/esnext.async-iterator.map.js');
8
+ require('core-js/modules/esnext.iterator.map.js');
9
+ require('react');
10
+ var dsTooltip = require('@elliemae/ds-tooltip');
11
+
12
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
13
+
14
+ var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
15
+
16
+ const TippedSelect = props => {
17
+ const {
18
+ tip,
19
+ onChange = () => null,
20
+ className,
21
+ options,
22
+ defaultValue = '',
23
+ values,
24
+ zIndex,
25
+ children
26
+ } = props;
27
+ const fallBackChildren = values && values.map((value, index) => /*#__PURE__*/_jsx__default["default"]("option", {
28
+ value: value === 'normal' ? '' : value
29
+ }, value, options ? options[index] : null));
30
+ return /*#__PURE__*/_jsx__default["default"]("div", {
31
+ className: "tooltip"
32
+ }, void 0, /*#__PURE__*/_jsx__default["default"](dsTooltip.DSTooltipV3, {
33
+ text: tip,
34
+ zIndex: zIndex
35
+ }, void 0, /*#__PURE__*/_jsx__default["default"]("div", {}, void 0, /*#__PURE__*/_jsx__default["default"]("select", {
36
+ className: className,
37
+ defaultValue: defaultValue,
38
+ onChange: e => {
39
+ e.persist();
40
+ onChange(e);
41
+ }
42
+ }, void 0, children || fallBackChildren))));
43
+ };
44
+
45
+ exports.TippedSelect = TippedSelect;
@@ -2,14 +2,18 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ require('core-js/modules/esnext.async-iterator.map.js');
6
+ require('core-js/modules/esnext.iterator.map.js');
7
+
5
8
  function sinToHex(i, size, phase) {
6
9
  const sin = Math.sin(Math.PI / size * 2 * i + phase);
7
10
  const int = Math.floor(sin * 127) + 128;
8
11
  const hex = int.toString(16);
9
- return hex.length === 1 ? `0${hex}` : hex;
12
+ return hex.length === 1 ? "0".concat(hex) : hex;
10
13
  }
11
14
 
12
- function getRainbowColors(size = 28) {
15
+ function getRainbowColors() {
16
+ let size = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 28;
13
17
  const colors = new Array(size).fill(undefined);
14
18
  return colors.map((color, idx) => {
15
19
  const red = sinToHex(idx, size, 0 * Math.PI * 2 / 3); // 0 deg
@@ -18,7 +22,7 @@ function getRainbowColors(size = 28) {
18
22
 
19
23
  const green = sinToHex(idx, size, 2 * Math.PI * 2 / 3); // 240 deg
20
24
 
21
- color = `#${red}${green}${blue}`;
25
+ color = "#".concat(red).concat(green).concat(blue);
22
26
  return color;
23
27
  });
24
28
  }
@@ -2,6 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ require('core-js/modules/esnext.async-iterator.map.js');
6
+ require('core-js/modules/esnext.iterator.map.js');
7
+
8
+ var _this = undefined;
5
9
  const fields = ['Lender Name ­ «315»', 'Lender Address ­ «319»', 'Lender City ­ «313»', 'Lender State ­ «321»', 'Lender Zip ­ «323»', 'Borrower First Name ­ «4000»', 'Borrower Last Name ­ «4002»', 'Total Loan Amount ­ «2»', 'Loan Term ­ «4»', 'Loan to Value ­ «976»', 'Monthly Payment ­ «912»', 'Interest Rate ­ «3»', 'Loan Originator Name ­ «1612»', 'Loan Originator Email ­ «3968»', 'Loan Originator Phone ­ «1823»', 'NMLS Loan Originator ID ­ «3238»'];
6
10
  /**
7
11
  * Returns the fields names
@@ -9,13 +13,16 @@ const fields = ['Lender Name ­ «315»', 'Lender Address ­ «319»', 'Lender C
9
13
  * @param customFields
10
14
  */
11
15
 
12
- const getFields = (customFields = fields) => customFields.map((opt, index) => ({
13
- id: `${opt}_${index}`,
14
- // icon: 'ADD',
15
- label: `${opt}`,
16
- onClick: opt.indexOf('«') !== -1 ? () => undefined.onOptionClick(undefined.getFieldCode(opt)) : null,
17
- type: opt === '' ? 'separator' : null
18
- }));
16
+ const getFields = function () {
17
+ let customFields = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : fields;
18
+ return customFields.map((opt, index) => ({
19
+ id: "".concat(opt, "_").concat(index),
20
+ // icon: 'ADD',
21
+ label: "".concat(opt),
22
+ onClick: opt.indexOf('«') !== -1 ? () => _this.onOptionClick(_this.getFieldCode(opt)) : null,
23
+ type: opt === '' ? 'separator' : null
24
+ }));
25
+ };
19
26
  /**
20
27
  * Returns a field's name
21
28
  *
package/cjs/constants.js CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ require('core-js/modules/web.dom-collections.iterator.js');
5
6
  var colors$1 = require('./components/colors.js');
6
7
 
7
8
  const colors = ['#000000', '#e60000', '#ff9900', '#ffff00', '#008A00', '#0066cc', '#9933ff', '#ffffff', '#facccc', '#ffebcc', '#ffffcc', '#cce8cc', '#cce0f5', '#ebd6ff', '#bbbbbb', '#f06666', '#ffc266', '#ffff66', '#66b966', '#66a3e0', '#c285ff', '#888888', '#a10000', '#b26b00', '#b2b200', '#006100', '#0047b2', '#6b24b2', '#444444', '#5c0000', '#663d00', '#666600', '#003700', '#002966', '#3d1466', ...colors$1.getRainbowColors(28)];
package/cjs/index.js CHANGED
@@ -13,8 +13,6 @@ exports.WYSIWYWithSchema = DSWYSIWYGEditor.WYSIWYWithSchema;
13
13
  exports["default"] = DSWYSIWYGEditor["default"];
14
14
  exports.CustomDropdown = CustomToolbar.CustomDropdown;
15
15
  exports.CustomToolbar = CustomToolbar.CustomToolbar;
16
- exports.TippedButton = CustomToolbar.TippedButton;
17
- exports.TippedSelect = CustomToolbar.TippedSelect;
18
16
  exports.CustomImageUploader = CustomImageUploader.CustomImageUploader;
19
17
  exports.colors = constants.colors;
20
18
  exports.defaultItems = constants.defaultItems;
@@ -0,0 +1,33 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ require('core-js/modules/web.dom-collections.iterator.js');
6
+ require('core-js/modules/esnext.async-iterator.find.js');
7
+ require('core-js/modules/esnext.iterator.constructor.js');
8
+ require('core-js/modules/esnext.iterator.find.js');
9
+ require('core-js/modules/es.string.replace.js');
10
+
11
+ const hrefTagRegexp = /%7B%7B.+%7D%7D/gm;
12
+ const clipboardLinkWithTagMatcher = (node, delta) => {
13
+ if (node.origin === window.location.origin) {
14
+ const nodeHref = node.href;
15
+ const tagMatch = nodeHref.match(hrefTagRegexp);
16
+
17
+ if (tagMatch) {
18
+ var _delta$ops;
19
+
20
+ const [overWrittenHrefValue] = tagMatch;
21
+ const insertLinkOperation = delta === null || delta === void 0 ? void 0 : (_delta$ops = delta.ops) === null || _delta$ops === void 0 ? void 0 : _delta$ops.find(operation => {
22
+ var _operation$attributes, _operation$attributes2, _operation$attributes3;
23
+
24
+ return operation === null || operation === void 0 ? void 0 : (_operation$attributes = operation.attributes) === null || _operation$attributes === void 0 ? void 0 : (_operation$attributes2 = _operation$attributes.link) === null || _operation$attributes2 === void 0 ? void 0 : (_operation$attributes3 = _operation$attributes2.match) === null || _operation$attributes3 === void 0 ? void 0 : _operation$attributes3.call(_operation$attributes2, hrefTagRegexp);
25
+ });
26
+ if (insertLinkOperation) insertLinkOperation.attributes.link = overWrittenHrefValue.replace(/%7B%7B/gm, '{{').replace(/%7D%7D/gm, '}}');
27
+ }
28
+ }
29
+
30
+ return delta;
31
+ };
32
+
33
+ exports.clipboardLinkWithTagMatcher = clipboardLinkWithTagMatcher;
@@ -8,7 +8,7 @@ const multiplier = 2;
8
8
 
9
9
  class IndentAttributor extends Parchment.Attributor.Style {
10
10
  add(node, value) {
11
- return super.add(node, `${value * multiplier}em`);
11
+ return super.add(node, "".concat(value * multiplier, "em"));
12
12
  }
13
13
 
14
14
  value(node) {
@@ -23,7 +23,7 @@ class IndentAttributor extends Parchment.Attributor.Style {
23
23
 
24
24
  const IndentStyle = new IndentAttributor('indent', 'margin-left', {
25
25
  scope: Parchment.Scope.BLOCK,
26
- whitelist: levels.map(value => `${value * multiplier}em`)
26
+ whitelist: levels.map(value => "".concat(value * multiplier, "em"))
27
27
  });
28
28
 
29
29
  module.exports = IndentStyle;
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
4
+ require('core-js/modules/web.dom-collections.iterator.js');
4
5
  var ReactQuill = require('react-quill');
5
6
 
6
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@@ -13,8 +14,8 @@ const sanitizeProtocol = value => {
13
14
 
14
15
  if (!value.startsWith('http') && !value.startsWith('ftp') && !value.startsWith('mailto:') && !value.startsWith('{{')) {
15
16
  if (!value.startsWith('www')) {
16
- newVal = `https://www.${value}`;
17
- } else newVal = `https://${value}`;
17
+ newVal = "https://www.".concat(value);
18
+ } else newVal = "https://".concat(value);
18
19
  }
19
20
 
20
21
  return newVal;
@@ -30,8 +31,8 @@ function getIsValidProtocol(url, protocols) {
30
31
  const Link = ReactQuill.Quill.import('formats/link');
31
32
 
32
33
  class LinkFormat extends Link {
33
- constructor(...args) {
34
- super(...args);
34
+ constructor() {
35
+ super(...arguments);
35
36
 
36
37
  _defineProperty__default["default"](this, "blotName", 'link');
37
38
 
@@ -9,7 +9,9 @@ const Delta = ReactQuill.Quill.import('delta');
9
9
  */
10
10
 
11
11
  class PlainClipboard extends Clipboard {
12
- convert(html = null) {
12
+ convert() {
13
+ let html = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
14
+
13
15
  if (typeof html === 'string') {
14
16
  this.container.innerHTML = html;
15
17
  }
package/cjs/utils.js CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ require('core-js/modules/esnext.async-iterator.for-each.js');
6
+ require('core-js/modules/esnext.iterator.constructor.js');
7
+ require('core-js/modules/esnext.iterator.for-each.js');
8
+
5
9
  const formatHTML = html => {
6
10
  const tab = '\t';
7
11
  let result = '';
@@ -11,7 +15,7 @@ const formatHTML = html => {
11
15
  indent = indent.substring(tab.length);
12
16
  }
13
17
 
14
- result += `${indent}<${element}>\r\n`;
18
+ result += "".concat(indent, "<").concat(element, ">\r\n");
15
19
 
16
20
  if (element.match(/^<?\w[^>]*[^/]$/)) {
17
21
  indent += tab;
@@ -1,5 +1,11 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
2
  import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
3
+ import 'core-js/modules/web.dom-collections.iterator.js';
4
+ import 'core-js/modules/esnext.async-iterator.filter.js';
5
+ import 'core-js/modules/esnext.iterator.constructor.js';
6
+ import 'core-js/modules/esnext.iterator.filter.js';
7
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
8
+ import 'core-js/modules/esnext.iterator.for-each.js';
3
9
  import { useState, useEffect } from 'react';
4
10
  import { PropTypes, describe } from 'react-desc';
5
11
  import DSWYSIWYGEditorImpl from './components/DSWYSIWYGEditorImpl.js';
@@ -49,11 +55,7 @@ const DSWYSIWYGEditor = _ref => {
49
55
 
50
56
  const wysiwygEditorProps = {
51
57
  value: PropTypes.string.description('editors value').isRequired,
52
- onChange: PropTypes.func.description(`(content, delta, source, editor) : Called back with the new contents of the editor after change.
53
- It will be passed the HTML contents of the editor, a delta object expressing the change, the source of the change, and finally a read-only proxy to editor accessors such as getHTML().
54
- ⚠️ Do not use this delta object as value, as it will cause a loop.
55
- Use editor.getContents() instead. See Using Deltas for details.
56
- Read more: https://github.com/zenoamaro/react-quill#props`).isRequired,
58
+ onChange: PropTypes.func.description("(content, delta, source, editor) : Called back with the new contents of the editor after change. \n It will be passed the HTML contents of the editor, a delta object expressing the change, the source of the change, and finally a read-only proxy to editor accessors such as getHTML(). \n \u26A0\uFE0F Do not use this delta object as value, as it will cause a loop. \n Use editor.getContents() instead. See Using Deltas for details. \n Read more: https://github.com/zenoamaro/react-quill#props").isRequired,
57
59
  getQuillRef: PropTypes.func.description('function to use quill.js ref'),
58
60
  quillModules: PropTypes.object.description('object to override quill modules'),
59
61
  customToolbar: PropTypes.element.description('custom toolbar'),
@@ -61,7 +63,8 @@ const wysiwygEditorProps = {
61
63
  showRawHTML: PropTypes.bool.description('whether to display html view or not').defaultValue(false),
62
64
  height: PropTypes.string.description('heigth of the editors text area'),
63
65
  readOnly: PropTypes.string.description("If true, the editor won't allow changing its contents. Wraps the Quill disable API."),
64
- hideItems: PropTypes.object.description('object of defaultItems to be removed from toolbar').defaultValue({})
66
+ hideItems: PropTypes.object.description('object of defaultItems to be removed from toolbar').defaultValue({}),
67
+ zIndex: PropTypes.number.description('zIndex to be used (required when used in a modal for correct tooltips displaying)')
65
68
  };
66
69
  const WYSIWYWithSchema = describe(DSWYSIWYGEditor);
67
70
  WYSIWYWithSchema.propTypes = wysiwygEditorProps;
@@ -1,21 +1,24 @@
1
1
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'core-js/modules/web.dom-collections.iterator.js';
2
3
  import { useState } from 'react';
3
- import Image from '@elliemae/ds-icons/Image';
4
+ import { Image } from '@elliemae/ds-icons';
4
5
  import DSUploader from '@elliemae/ds-uploader';
5
6
  import DSModal, { MODAL_TYPE_V2 } from '@elliemae/ds-modal';
6
- import { TippedButton } from './CustomToolbar.js';
7
+ import { TippedButton } from './TippedButton.js';
7
8
  import { jsxs, Fragment } from 'react/jsx-runtime';
8
9
 
9
10
  const ALLOWED_TYPES_TEXT = 'JPG, JPEG, PNG, GIF, BMP, TIFF';
10
11
  const ALLOWED_TYPES = /image\/(jpeg|jpg|png|gif|bmp|tiff)/;
11
12
  const DEFAULT_MAX_SIZE = 1024 * 1024; // 1 MB
12
13
 
13
- const CustomImageUploader = ({
14
- quillRef,
15
- editorFieldName,
16
- allowedImageTypes = ALLOWED_TYPES_TEXT,
17
- uploadAsset = () => null
18
- }) => {
14
+ const CustomImageUploader = _ref => {
15
+ let {
16
+ quillRef,
17
+ editorFieldName,
18
+ allowedImageTypes = ALLOWED_TYPES_TEXT,
19
+ uploadAsset = () => null,
20
+ zIndex = 1
21
+ } = _ref;
19
22
  const [isOpen, setIsOpen] = useState(false);
20
23
  const [error, setError] = useState(null);
21
24
  const [inProgress, setInProgress] = useState(false);
@@ -23,7 +26,7 @@ const CustomImageUploader = ({
23
26
  index: 0,
24
27
  length: 0
25
28
  });
26
- const elementId = `uploadImage${editorFieldName}`; // eslint-disable-next-line consistent-return
29
+ const elementId = "uploadImage".concat(editorFieldName); // eslint-disable-next-line consistent-return
27
30
 
28
31
  const handleFileChange = async files => {
29
32
  if (!inProgress) {
@@ -69,6 +72,7 @@ const CustomImageUploader = ({
69
72
 
70
73
  return /*#__PURE__*/jsxs(Fragment, {
71
74
  children: [/*#__PURE__*/_jsx(TippedButton, {
75
+ zIndex: zIndex,
72
76
  tip: "Insert Image",
73
77
  onClick: () => {
74
78
  setLastSelection(quillRef === null || quillRef === void 0 ? void 0 : quillRef.getEditor().getSelection());