Skip to content

Commit

Permalink
Content Model: Do not add entity delimiter to editable entity (#2252)
Browse files Browse the repository at this point in the history
  • Loading branch information
JiuqingSong authored Dec 9, 2023
1 parent 312e55a commit 4e76c8e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,11 @@ export function normalizeDelimitersInEditor(editor: IEditor) {

function addDelimitersIfNeeded(nodes: Element[] | NodeListOf<Element>) {
nodes.forEach(node => {
if (isEntityElement(node)) {
if (
isNodeOfType(node, 'ELEMENT_NODE') &&
isEntityElement(node) &&
!node.isContentEditable
) {
addDelimiters(node.ownerDocument, node as HTMLElement);
}
});
Expand Down

0 comments on commit 4e76c8e

Please sign in to comment.