@bigbinary/neeto-editor 1.47.121 → 1.47.123

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 CHANGED
@@ -14,12 +14,12 @@ import { is, intersection, difference, union, isEmpty, isNil, mergeRight, assoc,
14
14
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
15
15
  import { B as BulletList$1, i as index_default, a as index_default$1, R as Resizable, b as index_default$2, L as Link$1, s as scrollHandler, c as index_default$3, O as OrderedList$1, d as index_default$4, f as fuzzySearch, T as Table$2, e as TaskList, g as TaskItem, C as CharacterCount, h as index_default$5, j as index_default$6, k as TextStyle, l as index_default$7, F as Focus, m as index_default$8, n as TableRow, o as TableHeader, p as TableCell, q as Color, r as ListItem, t as index_default$9, u as index_default$a, v as useFetchKbArticles, M as MODE, w as createArticleOptions, x as MODAL_LEFT_OFFSET, y as MODAL_TOP_OFFSET, z as MODAL_TRANSFORM_Y, A as MODAL_TRANSFORM_X, D as MODAL_BOTTOM_MARGIN, E as buildArticleFullUrl, G as useEditorWarnings, H as useDeletedArticles } from './chunk-Bmhz4YEy.js';
16
16
  import { n } from './chunk-C2dztUxs.js';
17
- import { b as buildLevelsFromOptions, v as validateAndFormatUrl, g as getEditorStyles, c as transformPastedHTML, d as clipboardTextParser, s as setInitialPosition } from './chunk-CnsiyshR.js';
17
+ import { b as buildLevelsFromOptions, v as validateAndFormatUrl, g as getEditorStyles, c as transformPastedHTML, h as handlePaste, d as clipboardTextParser, s as setInitialPosition } from './chunk-C_jttcYg.js';
18
18
  import ReactDOM from 'react-dom/server';
19
19
  import { l as lowlight, d as decodeHtmlEntities, r as removeEmptyTags } from './chunk-Qg4uQqj3.js';
20
20
  import { L as LINK_VALIDATION_SCHEMA, D as DEFAULT_EDITOR_OPTIONS } from './chunk-CF5f8-fy.js';
21
21
  import Megaphone from '@bigbinary/neeto-icons/misc/Megaphone';
22
- import { C as CALLOUT_TYPES, E as EmojiPickerMenu, v as validateUrl, g as getLinkPopoverPosition, M as Menu$4, a as MenuDynamicVariables, b as MediaUploader, L as LinkAddPopOver } from './chunk-CHpkesFt.js';
22
+ import { C as CALLOUT_TYPES, E as EmojiPickerMenu, v as validateUrl, g as getLinkPopoverPosition, M as Menu$4, a as MenuDynamicVariables, b as MediaUploader, L as LinkAddPopOver } from './chunk-CDPeBjvi.js';
23
23
  import Down from '@bigbinary/neeto-icons/Down';
24
24
  import Highlight from '@bigbinary/neeto-icons/Highlight';
25
25
  import CopyToClipboardButton from '@bigbinary/neeto-molecules/CopyToClipboardButton';
@@ -5215,8 +5215,11 @@ var Editor = function Editor(_ref, ref) {
5215
5215
  };
5216
5216
  var debouncedOnChangeHandler = useFuncDebounce(function (_ref2) {
5217
5217
  var editor = _ref2.editor;
5218
- return onChange(editor.getHTML());
5218
+ if (!editor.isDestroyed) onChange(editor.getHTML());
5219
5219
  }, 100);
5220
+ useEffect(function () {
5221
+ return debouncedOnChangeHandler.cancel;
5222
+ }, []);
5220
5223
  var handleBlur = function handleBlur(props) {
5221
5224
  var editor = props.editor;
5222
5225
  if (!disableTrimOnBlur) {
@@ -5281,6 +5284,7 @@ var Editor = function Editor(_ref, ref) {
5281
5284
  "data-testid": "neeto-editor-content"
5282
5285
  }, ariaAttributes), contentAttributes),
5283
5286
  clipboardTextParser: clipboardTextParser,
5287
+ handlePaste: handlePaste,
5284
5288
  transformPastedHTML: transformPastedHTML
5285
5289
  },
5286
5290
  parseOptions: {