Hello, I’m trying to use codemirror with a theme, but it does not work and the console shows the error
"Uncaught SyntaxError: expected expression, got ‘.’ " in 3024-night.css:11
I checked the line and couldn’t understand what the problem is though.
I am new to Codemirror so it is of course possible I made a setup mistake.
Side note: if I remove the theme import and tag inside everything else works just fine.
This is the relevant code:
<script type="text/javascript" src="js/codemirror-5.60.0/lib/codemirror.js"></script>
<link rel="stylesheet" href="js/codemirror-5.60.0/lib/codemirror.css">
<script type="text/javascript" src="js/codemirror-5.60.0/mode/clike/clike.js"></script>
<script type="text/javascript" src="js/codemirror-5.60.0/theme/3024-night.css"></script>
<!--search libs-->
<script type="text/javascript" src="js/codemirror-5.60.0/addon/search/search.js"></script>
<script type="text/javascript" src="js/codemirror-5.60.0/addon/search/searchcursor.js"></script>
<script type="text/javascript" src="js/codemirror-5.60.0/addon/dialog/dialog.js"></script>
<link href="js/codemirror-5.60.0/addon/dialog/dialog.css" rel="stylesheet">
<!--hightlighter-->
<script type="text/javascript" src="js/codemirror-5.60.0/addon/search/match-highlighter.js"></script>
<!--klammern verbinden-->
<script type="text/javascript" src="js/codemirror-5.60.0/addon/edit/matchbrackets.js"></script>
<!-- klammern automatisch schließen-->
<script type="text/javascript" src="js/codemirror-5.60.0/addon/edit/closebrackets.js"></script>
<script type="text/javascript">
var editor;
$(function() {
setTimeout(function() {
editor = CodeMirror.fromTextArea(document.getElementById("codeTextArea"), {
mode: "text/x-java",
theme: "3024-night",
lineNumbers: true,
indentUnit : 4,
indentWithTabs : true,
autoFocus: true,
smartIndent: true,
highlightSelectionMatches: true,
matchBrackets: true,
autoCloseBrackets: true
});
//$("#tabs").tabs();
}, 200);
});