npm.io
1.1.0 • Published 2 years ago

codemirror-theme-github

Licence
MIT
Version
1.1.0
Deps
0
Size
4 kB
Vulns
0
Weekly
43
Stars
4

codemirror-theme-github

A CodeMirror theme inspired by the GitHub editor.

Preview

Preview

Installation

npm install codemirror-theme-github --save

Usage

  1. Import the CSS file into your application:

    @import "codemirror-theme-github/theme/github";
  2. Tell CodeMirror to use it:

    const editor = CodeMirror(document.body, {
      mode: 'javascript',
      lineNumbers: true,
      theme: 'github',
    });