`; const getIframeContent = () => { if (!dom) return ''; const clonedDom = dom.cloneNode(true); clonedDom.querySelectorAll('[data-path]').forEach(el => { el.dataset.highlightId = el.dataset.path; }); // Check if body exists before injecting script if (clonedDom.body) { clonedDom.body.insertAdjacentHTML('beforeend', injectionScript); } return new XMLSerializer().serializeToString(clonedDom); } return ( <>
Code
{selectedElementInfo && (
Element Inspector
)}
Rendered Preview
{isLoading ? (
Generating...
) : (
)}
{toast &&
setToast(null)} />}
> ); }; ReactDOM.createRoot(document.getElementById('root')).render(
);