Improved code editor functionality (HTML5)