Payload Elementor listo
Pulsa Copiar payload y pégalo en Elementor.
\\r\\n\",\"_title\":\"Mousewheel Control for Carousel\"},\"elements\":[],\"isInner\":false,\"widgetType\":\"html\",\"elType\":\"widget\"}]}]}]}]}]}";
const status = document.getElementById('status');
const prettyJson = document.getElementById('prettyJson');
const toggleJsonBtn = document.getElementById('toggleJsonBtn');
let prettyLoaded = false;
async function copyText(text) {
if (navigator.clipboard && window.isSecureContext) {
await navigator.clipboard.writeText(text);
return true;
}
const ta = document.createElement('textarea');
ta.value = text;
ta.style.position = 'fixed';
ta.style.opacity = '0';
ta.style.left = '-9999px';
document.body.appendChild(ta);
ta.focus();
ta.select();
const ok = document.execCommand('copy');
document.body.removeChild(ta);
return ok;
}
document.getElementById('copyBtn').addEventListener('click', async () => {
const ok = await copyText(payload);
if (ok) {
status.textContent = 'Copiado. Pega en Elementor con Cmd/Ctrl + V.';
status.style.color = '#047857';
} else {
status.textContent = 'No se pudo copiar automáticamente. Copia manualmente el texto.';
status.style.color = '#b91c1c';
}
});
toggleJsonBtn.addEventListener('click', () => {
const willShow = prettyJson.hidden;
if (willShow && !prettyLoaded) {
try {
prettyJson.textContent = JSON.stringify(JSON.parse(payload), null, 2);
} catch (error) {
prettyJson.textContent = payload;
}
prettyLoaded = true;
}
prettyJson.hidden = !willShow;
toggleJsonBtn.textContent = willShow ? 'Ocultar JSON legible' : 'Mostrar JSON legible';
});