https://codemirror.net/1/contrib/csharp/
i’m trying to get this to work in my html page,
i can’t find the css styling anywhere else except if i take it from that website.
e.g.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CodeMirror: C# demonstration</title>
<link rel="stylesheet" type="text/css" href="https://codemirror.net/1/contrib/csharp/css/csharpcolors.css">
<style type="text/css" id="dark-mode-custom-link"></style>
<style type="text/css" id="dark-mode-general-link"></style>
<style lang="en" type="text/css" id="dark-mode-custom-style"></style>
<style lang="en" type="text/css" id="dark-mode-native-style"></style>
<style lang="en" type="text/css" id="dark-mode-native-sheet"></style>
</head>
<body style="padding: 20px;" data-new-gr-c-s-check-loaded="14.1162.0" data-gr-ext-installed="" data-new-gr-c-s-loaded="14.1162.0">
<div style="border-top: 1px solid black; border-bottom: 1px solid black;">
<input type="text" id="code" style="display: none;">
</div>
<script src="https://codemirror.net/1/contrib/csharp/js/tokenizecsharp.js" type="text/javascript"></script>
<script src="https://codemirror.net/1/contrib/csharp/js/parsecsharp.js" type="text/javascript"></script>
<script src="https://codemirror.net/1/js/codemirror.js" type="text/javascript"></script>
<script type="text/javascript">
var editor = CodeMirror.fromTextArea(document.getElementById('code'), {
parserfile: ["https://codemirror.net/1/contrib/csharp/js/tokenizecsharp.js", "https://codemirror.net/1/contrib/csharp/js/parsecsharp.js"],
stylesheet: "https://codemirror.net/1/contrib/csharp/css/csharpcolors.css",
path: "https://codemirror.net/1/js/",
lineNumbers: true, // Add line numbers
indentUnit: 4
});
document.getElementById('addButton').addEventListener('click', function() {
var name = document.getElementById('nameInput').value;
var code = editor.getValue();
console.log('Name:', name);
console.log('C# Code:', code);
});
</script>
</body>
</html>