From 4b35c787dc46f44b4f9924855019610104e36c3b Mon Sep 17 00:00:00 2001 From: Jiuqing Song Date: Fri, 8 Dec 2023 18:19:50 -0800 Subject: [PATCH] Bump roosterjs-content-model-plugins to 0.21.3 to fix entity delimiter issue (#2253) * Content Model: Do not add entity delimiter to editable entity (#2252) * plugins 0.21.3: Fix delimiter issue --- .../lib/entityDelimiter/EntityDelimiterPlugin.ts | 6 +++++- versions.json | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages-content-model/roosterjs-content-model-plugins/lib/entityDelimiter/EntityDelimiterPlugin.ts b/packages-content-model/roosterjs-content-model-plugins/lib/entityDelimiter/EntityDelimiterPlugin.ts index 600228855fc..6d0bb852b17 100644 --- a/packages-content-model/roosterjs-content-model-plugins/lib/entityDelimiter/EntityDelimiterPlugin.ts +++ b/packages-content-model/roosterjs-content-model-plugins/lib/entityDelimiter/EntityDelimiterPlugin.ts @@ -147,7 +147,11 @@ export function normalizeDelimitersInEditor(editor: IEditor) { function addDelimitersIfNeeded(nodes: Element[] | NodeListOf) { nodes.forEach(node => { - if (isEntityElement(node)) { + if ( + isNodeOfType(node, 'ELEMENT_NODE') && + isEntityElement(node) && + !node.isContentEditable + ) { addDelimiters(node.ownerDocument, node as HTMLElement); } }); diff --git a/versions.json b/versions.json index 7a7a63a42da..30bb82c3237 100644 --- a/versions.json +++ b/versions.json @@ -4,6 +4,7 @@ "packages-content-model": "0.21.2", "overrides": { "roosterjs-editor-core": "8.59.1", - "roosterjs-editor-plugins": "8.59.1" + "roosterjs-editor-plugins": "8.59.1", + "roosterjs-content-model-plugins": "0.21.3" } }