/
sapbot
/
code-doodles
Обзор
Документация
Войти
/
sapbot
/
code-doodles
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
Live HTML Editor.html
183 строки
4 KB
sapbotgit
Create Live HTML Editor.html
16 фев 2026, 14:52
Не верифицирован
16 фев 2026, 14:52
f14724b
Код
Авторство
О чём код?
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Live HTML Editor</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; height: 100vh; display: flex; flex-direction: column; background: #1e1e1e; color: #d4d4d4; } .header { background: #252526; padding: 10px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #3e3e42; } .header h1 { font-size: 18px; font-weight: 500; color: #fff; } .credits { font-size: 12px; color: #858585; font-style: italic; } .container { display: flex; flex: 1; overflow: hidden; } .editor-pane { width: 50%; display: flex; flex-direction: column; border-right: 2px solid #3e3e42; } .pane-header { background: #2d2d30; padding: 8px 15px; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: #cccccc; border-bottom: 1px solid #3e3e42; } #htmlInput { flex: 1; width: 100%; background: #1e1e1e; color: #d4d4d4; border: none; padding: 20px; font-family: 'Consolas', 'Monaco', 'Courier New', monospace; font-size: 14px; line-height: 1.6; resize: none; outline: none; } .preview-pane { width: 50%; display: flex; flex-direction: column; background: #fff; } #preview { flex: 1; width: 100%; border: none; background: #fff; } /* Scrollbar styling */ ::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-track { background: #1e1e1e; } ::-webkit-scrollbar-thumb { background: #424242; border-radius: 5px; } ::-webkit-scrollbar-thumb:hover { background: #4f4f4f; } </style> </head> <body> <div class="header"> <h1>📝 Live HTML Editor</h1> <span class="credits">written by sapbot with help of Kimi K2.5</span> </div> <div class="container"> <div class="editor-pane"> <div class="pane-header">HTML Code</div> <textarea id="htmlInput" placeholder="Type your HTML code here..."><!DOCTYPE html> <html> <head> <style> body { font-family: Arial, sans-serif; padding: 20px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; min-height: 100vh; display: flex; align-items: center; justify-content: center; } .card { background: rgba(255,255,255,0.1); padding: 40px; border-radius: 20px; backdrop-filter: blur(10px); text-align: center; } h1 { margin-bottom: 10px; } p { opacity: 0.9; } </style> </head> <body> <div class="card"> <h1>Hello World! 🚀</h1> <p>Edit the code on the left to see changes instantly!</p> </div> </body> </html></textarea> </div> <div class="preview-pane"> <div class="pane-header">Live Preview</div> <iframe id="preview"></iframe> </div> </div> <script> const htmlInput = document.getElementById('htmlInput'); const preview = document.getElementById('preview'); function updatePreview() { const code = htmlInput.value; const doc = preview.contentDocument || preview.contentWindow.document; doc.open(); doc.write(code); doc.close(); } // Update preview on input htmlInput.addEventListener('input', updatePreview); // Initial load updatePreview(); </script> </body> </html>