From 9014ca039c7ff0099ea327cda2090892b502951a Mon Sep 17 00:00:00 2001 From: Dariusz Szut Date: Wed, 3 Jun 2020 12:47:09 +0200 Subject: [PATCH] EZP-31405: fix embed image link removal (#153) --- .../Resources/public/js/OnlineEditor/core/base-richtext.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bundle/Resources/public/js/OnlineEditor/core/base-richtext.js b/src/bundle/Resources/public/js/OnlineEditor/core/base-richtext.js index 776c08f1..e0139d40 100644 --- a/src/bundle/Resources/public/js/OnlineEditor/core/base-richtext.js +++ b/src/bundle/Resources/public/js/OnlineEditor/core/base-richtext.js @@ -66,6 +66,10 @@ importChildNodes(newElement, element.attributes[i], false); } + if (element.localName === 'a' && parent.dataset.ezelement === 'ezembed') { + element.setAttribute('data-cke-survive', '1'); + } + parent.appendChild(newElement); } else if (element.nodeType === Node.TEXT_NODE) { parent.appendChild(parent.ownerDocument.createTextNode(element.nodeValue));