UL
undraftlab // studio
index.html HTML5 Markup
Aktif Dosya: index.html Canlı Senkronizasyon
Canlı Önizleme (Live Preview)
Konsol Çıktısı (Console Log)
[system] UndraftLab Studio başlatıldı. Kodlar çalışmaya hazır.
`); doc.close(); } let autoRunTimer; function autoRun() { clearTimeout(autoRunTimer); autoRunTimer = setTimeout(runCode, 500); } window.addEventListener('message', function(event) { if (event.data && event.data.type) { const consoleOutput = document.getElementById('consoleOutput'); const div = document.createElement('div'); if (event.data.type === 'error') { div.className = "text-rose-400"; div.innerText = `> ${event.data.message}`; } else { div.className = "text-emerald-400"; div.innerText = `> ${event.data.message}`; } consoleOutput.appendChild(div); consoleOutput.scrollTop = consoleOutput.scrollHeight; } }); function clearConsole() { document.getElementById('consoleOutput').innerHTML = '
[system] Konsol temizlendi.
'; } function clearEditors() { if (confirm("Tüm kodları temizlemek istediğine emin misin?")) { document.getElementById('htmlInput').value = ""; document.getElementById('cssInput').value = ""; document.getElementById('jsInput').value = ""; runCode(); } } function downloadProject() { const html = document.getElementById('htmlInput').value; const blob = new Blob([html], { type: 'text/html;charset=utf-8' }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = 'index.html'; a.click(); URL.revokeObjectURL(url); } // İlk açılışta çalıştır window.onload = function() { runCode(); };