Editor Online | Save
button background: #0f172a; color: white; border: none; padding: 0.5rem 1.2rem; border-radius: 2rem; font-weight: 500; cursor: pointer; transition: 0.15s; font-size: 0.85rem; display: inline-flex; align-items: center; gap: 0.4rem;
.panel background: white; border-radius: 1.5rem; box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.02); overflow: hidden; flex: 1; min-width: 280px; transition: all 0.2s;
@media (max-width: 760px) body padding: 12px; .panel-header flex-direction: column; align-items: flex-start; save editor online
// Helper to update output editor with current input content (no transformation except explicit) function syncToOutput() const rawContent = inputEditor.value; outputEditor.value = rawContent; return rawContent;
// Event listeners applyBtn.addEventListener('click', applyChanges); downloadBtn.addEventListener('click', downloadSave); clearBtn.addEventListener('click', clearEditors); formatJsonBtn.addEventListener('click', prettyPrintJson); copyOutputBtn.addEventListener('click', copyOutput); button background: #0f172a
<script> (function() // DOM elements const inputEditor = document.getElementById('inputEditor'); const outputEditor = document.getElementById('outputEditor'); const applyBtn = document.getElementById('applyChangesBtn'); const downloadBtn = document.getElementById('downloadBtn'); const clearBtn = document.getElementById('clearBtn'); const formatJsonBtn = document.getElementById('formatJsonBtn'); const copyOutputBtn = document.getElementById('copyOutputBtn'); const fileLoader = document.getElementById('fileLoader'); const fileStatusSpan = document.getElementById('fileStatus');
h1 font-size: 2.5rem; font-weight: 700; background: linear-gradient(135deg, #1e293b, #3b82f6); background-clip: text; -webkit-background-clip: text; color: transparent; margin-bottom: 0.5rem; padding: 0.5rem 1.2rem
fileLoader.addEventListener('change', (event) => if (event.target.files && event.target.files[0]) loadFromFile(event.target.files[0]); // reset file input so same file can be loaded again fileLoader.value = ''; );
button.warning background: #b91c1c;
.button-group display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; margin-bottom: 1rem;
.status font-size: 0.8rem; color: #2d6a4f; background: #e9f5ef; padding: 0.3rem 0.8rem; border-radius: 2rem;
