Kuldeep Bisht
Kuldeep Bisht

Reputation: 43

How to set a HTML, CSS and Javascript mode in CodeMirror editor? I want to combine all in one editor

How to set an HTML, CSS, and JavaScript mode in CodeMirror editor? I want to combine all in one editor.

Thank You...

<script>
  var editor = CodeMirror.fromTextArea(document.getElementById("demotext"), {
    lineNumbers: true,
    styleActiveLine: true,
    mode: "text/html",
    readOnly: 'nocursor',
    mode: "javascript",
    matchBrackets: true
  });
</script>

Upvotes: 1

Views: 1643

Answers (1)

Leftium
Leftium

Reputation: 17903

Use the htmlmixed mode. This mode includes CSS and Javascript.

Upvotes: 1

Related Questions