Welcome to VSCode Web Editor
Start by creating a new file or opening an existing project
Start by creating a new file or opening an existing project
A lightweight code editor inspired by Visual Studio Code, running entirely in your browser.
Features:
Version: 1.0.0
`; // Display in output panel document.getElementById('outputContent').innerHTML = message; document.getElementById('outputPanel').style.display = 'flex'; } // Enhanced keyboard shortcuts document.addEventListener('keydown', function(e) { if (e.ctrlKey || e.metaKey) { switch (e.key.toLowerCase()) { case 's': e.preventDefault(); saveFile(); break; // ... existing code ... } } }); // Hide context menu on click outside // Hide context menu handled above with click event // Prevent context menu on right click outside file tree document.addEventListener('contextmenu', function(e) { if (!e.target.closest('.file-explorer')) { e.preventDefault(); } }); // Initialize window.addEventListener('load', function() { initResizeHandlers(); if (Object.keys(fileSystem).length > 0) { renderFileTree(); } // Show output panel initially to make it visible document.getElementById('runButton').addEventListener('click', function() { runCode(); }); // Ensure dropdown items have click handlers document.querySelectorAll('.dropdown-item').forEach(item => { item.addEventListener('click', function(e) { e.stopPropagation(); // Hide menu after clicking an item document.querySelectorAll('.dropdown-menu').forEach(menu => { menu.style.display = 'none'; }); }); }); });