Create online HTML, CSS, JS files reader we need codemirror library and input [type="file"] to create online html, css, js reader <link rel="stylesheet" href="https://codemirror.net/lib/codemirror.css"> <link rel="stylesheet" href="https://codemirror.net/doc/docs.css"> <script src="https://codemirror.net/lib/codemirror.js"></script> <script src="https://codemirror.net/mode/css/css.js"></script> <script src="https://codemirror.net/mode/xml/xml.js"></script> <script src="https://codemirror.net/mode/javascript/javascript.js"></script> <script src="https://codemirror.net/mode/css/css.js"></script> <script src="https://codemirror.net/mode/htmlmixed/htmlmixed.js"></script> <input type="file" onchange="localLoad(this.files);" /> <div id="editor"> </div> <script> var myCodeMirror = CodeMirror( document.getElementById('editor'), { mode: "text/html", lineNumbers: true }); function localLoad(files) { if (files.length == 1) { document.title = escape(files[0].name); var reader = new FileReader(); reader.onload = function(e) { myCodeMirror.setValue(e.target.result); }; reader.readAsText(files[0]); } } </script> © 2025 Manajmnt code Share to : ☷✎ Related Online Speech to text [English, Arabic, French, Spanish, Turkish...] :root { font-size: 16px; } * { font-family: monospace; margin: 0; padding: 0; } a:link { colo… Read MoreCheck if thumbnail from Blogger JSON object is nullIn this example we'll check whether an thumbnail exists or not in the Json file, because if you find… Read MoreHow to make search button in html with iconIn this lesson, we will share with you How to make search button in html with icon (font-awesome). l… Read More Comments
Comments
Post a Comment
message