@contentful/field-editor-rich-text 3.4.3 → 3.4.4

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.
@@ -2,7 +2,7 @@ import React__default, { createContext, useContext, useMemo, useState, useEffect
2
2
  import { MissingEntityCard, WrappedAssetCard, useEntity, useEntityLoader, WrappedEntryCard, ScheduledIconWithTooltip, EntityProvider, getScheduleTooltipContent } from '@contentful/field-editor-reference';
3
3
  import { entityHelpers, ModalDialogLauncher, FieldConnector } from '@contentful/field-editor-shared';
4
4
  import { BLOCKS, INLINES, TEXT_CONTAINERS, HEADINGS, LIST_ITEM_BLOCKS, MARKS, CONTAINERS, TOP_LEVEL_BLOCKS, VOID_BLOCKS, EMPTY_DOCUMENT } from '@contentful/rich-text-types';
5
- import { usePlateEditorRef as usePlateEditorRef$1, usePlateEditorState as usePlateEditorState$1, getPlateSelectors as getPlateSelectors$1, withoutNormalizing as withoutNormalizing$1, createPlateEditor as createPlateEditor$1, blurEditor as blurEditor$1, toSlatePoint, mockPlugin as mockPlugin$1, focusEditor as focusEditor$1, selectEditor as selectEditor$1, getNodeEntries as getNodeEntries$1, isMarkActive as isMarkActive$1, getAboveNode as getAboveNode$1, getRange as getRange$1, isText as isText$1, isElement as isElement$1, getEditorString, getBlockAbove as getBlockAbove$1, getParentNode as getParentNode$1, getLastChildPath as getLastChildPath$1, someHtmlElement as someHtmlElement$1, isCollapsed, isInline as isInline$2, isEndPoint as isEndPoint$1, getPointAfter as getPointAfter$1, isFirstChild as isFirstChild$1, getNodeEntry as getNodeEntry$1, isEditor as isEditor$1, isEditorReadOnly as isEditorReadOnly$1, isRangeAcrossBlocks as isRangeAcrossBlocks$1, getPluginType as getPluginType$1, getCommonNode as getCommonNode$1, findNode as findNode$1, isBlock, match as match$1, isAncestorEmpty as isAncestorEmpty$1, isLastChild, getPointBefore as getPointBefore$1, queryNode as queryNode$1, isNode as isNode$1, getEndPoint as getEndPoint$1, getChildren as getChildren$1, findNodePath as findNodePath$1, getLastNodeByLevel as getLastNodeByLevel$1, createPathRef as createPathRef$1, getNodeTexts as getNodeTexts$1, isSelectionAtBlockStart as isSelectionAtBlockStart$1, getNodeChildren as getNodeChildren$1, isExpanded, isSelectionAtBlockEnd as isSelectionAtBlockEnd$1, someNode as someNode$1, getStartPoint as getStartPoint$1, getMarks as getMarks$1, wrapNodes as wrapNodes$1, insertNodes as insertNodes$1, unhangRange as unhangRange$1, setSelection as setSelection$1, unsetNodes as unsetNodes$1, removeMark as removeMark$1, addMark as addMark$1, removeNodes as removeNodes$1, unwrapNodes as unwrapNodes$1, liftNodes as liftNodes$1, select as select$1, toggleMark as toggleMark$1, normalizeEditor, setNodes as setNodes$1, toggleNodeType as toggleNodeType$1, deleteText as deleteText$1, deleteFragment as deleteFragment$1, splitNodes as splitNodes$1, moveSelection as moveSelection$1, insertText as insertText$1, collapseSelection as collapseSelection$1, moveChildren as moveChildren$1, moveNodes as moveNodes$1, ELEMENT_DEFAULT as ELEMENT_DEFAULT$1, isBlockAboveEmpty, KEY_DESERIALIZE_HTML, hasSingleChild, createDeserializeHtmlPlugin, createDeserializeAstPlugin, getPlateActions, Plate } from '@udecode/plate-core';
5
+ import { usePlateEditorRef as usePlateEditorRef$1, usePlateEditorState as usePlateEditorState$1, getPlateSelectors as getPlateSelectors$1, focusEditor as focusEditor$1, withoutNormalizing as withoutNormalizing$1, createPlateEditor as createPlateEditor$1, blurEditor as blurEditor$1, toSlatePoint, mockPlugin as mockPlugin$1, selectEditor as selectEditor$1, getNodeEntries as getNodeEntries$1, isMarkActive as isMarkActive$1, getAboveNode as getAboveNode$1, getRange as getRange$1, isText as isText$1, isElement as isElement$1, getEditorString, getBlockAbove as getBlockAbove$1, getParentNode as getParentNode$1, getLastChildPath as getLastChildPath$1, someHtmlElement as someHtmlElement$1, isCollapsed, isInline as isInline$2, isEndPoint as isEndPoint$1, getPointAfter as getPointAfter$1, isFirstChild as isFirstChild$1, getNodeEntry as getNodeEntry$1, isEditor as isEditor$1, isEditorReadOnly as isEditorReadOnly$1, isRangeAcrossBlocks as isRangeAcrossBlocks$1, getPluginType as getPluginType$1, getCommonNode as getCommonNode$1, findNode as findNode$1, isBlock, match as match$1, isAncestorEmpty as isAncestorEmpty$1, isLastChild, getPointBefore as getPointBefore$1, queryNode as queryNode$1, isNode as isNode$1, getEndPoint as getEndPoint$1, getChildren as getChildren$1, findNodePath as findNodePath$1, getLastNodeByLevel as getLastNodeByLevel$1, createPathRef as createPathRef$1, getNodeTexts as getNodeTexts$1, isSelectionAtBlockStart as isSelectionAtBlockStart$1, getNodeChildren as getNodeChildren$1, isExpanded, isSelectionAtBlockEnd as isSelectionAtBlockEnd$1, someNode as someNode$1, getStartPoint as getStartPoint$1, getMarks as getMarks$1, wrapNodes as wrapNodes$1, insertNodes as insertNodes$1, unhangRange as unhangRange$1, setSelection as setSelection$1, unsetNodes as unsetNodes$1, removeMark as removeMark$1, addMark as addMark$1, removeNodes as removeNodes$1, unwrapNodes as unwrapNodes$1, liftNodes as liftNodes$1, select as select$1, toggleMark as toggleMark$1, normalizeEditor, setNodes as setNodes$1, toggleNodeType as toggleNodeType$1, deleteText as deleteText$1, deleteFragment as deleteFragment$1, splitNodes as splitNodes$1, moveSelection as moveSelection$1, insertText as insertText$1, collapseSelection as collapseSelection$1, moveChildren as moveChildren$1, moveNodes as moveNodes$1, ELEMENT_DEFAULT as ELEMENT_DEFAULT$1, isBlockAboveEmpty, KEY_DESERIALIZE_HTML, hasSingleChild, createDeserializeHtmlPlugin, createDeserializeAstPlugin, getPlateActions, Plate } from '@udecode/plate-core';
6
6
  import { css, cx } from 'emotion';
7
7
  import areEqual from 'fast-deep-equal';
8
8
  import noop from 'lodash-es/noop';
@@ -2349,8 +2349,10 @@ var createOnKeyDown = function createOnKeyDown() {
2349
2349
  }
2350
2350
 
2351
2351
  if (isHotkey('escape', event)) {
2352
+ event.stopPropagation();
2352
2353
  removeMark(editor, COMMAND_PROMPT, range);
2353
2354
  editor.tracking.onCommandPaletteAction('cancelRichTextCommandPalette');
2355
+ focusEditor(editor);
2354
2356
  }
2355
2357
  };
2356
2358
  };