Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 907 Bytes

README.md

File metadata and controls

20 lines (14 loc) · 907 Bytes

NPM version

Javascript-mixed mode for CodeMirror

A language mode for CodeMirror, support highlighting HTML/CSS in javascript codes.

Features

  • Detects and highlights HTML in strings / template strings. (for strings begin with a tag)
    • HTML, highlights inner CSS / Javascript as well, e.g., highlights CSS for the text in <style> tags.
  • Highlights CSS for userscript's GM_addStyle()
  • Highlights arbitrary template strings as HTML / CSS by prepending an inline /*html*/ and /*css*/ hint respectively.

screenshot

Installation

To add it to your project, assuming codemirror has been installed:

npm install codemirror-js-mixed