diff --git a/ui/src/components/Customize/index.tsx b/ui/src/components/Customize/index.tsx index 78665be8..0570d19f 100644 --- a/ui/src/components/Customize/index.tsx +++ b/ui/src/components/Customize/index.tsx @@ -34,7 +34,11 @@ const ActivateScriptNodes = (el, part) => { } scriptList.forEach((so) => { const script = document.createElement('script'); - script.textContent = so.textContent; + script.text = so.text; + for (let i = 0; i < so.attributes.length; i += 1) { + const attr = so.attributes[i]; + script.setAttribute(attr.name, attr.value); + } el.replaceChild(script, so); }); };