0.3.0 • Published 2 years ago

monaco-editor-node v0.3.0

Weekly downloads
3
License
MIT
Repository
github
Last release
2 years ago

monaco-editor-node

npm check

Wrapper of monaco-editor to use some functionalities in Node.js.

The bundle size is much smaller than original.

See also monaco-diff.

Install

npm install monaco-editor-node

Usage

import * as monaco from "monaco-editor-node";

monaco
  .colorize(
    `h1 {
  font-size: 2.5em;
}
`,
    "text/css",
    {}
  )
  .then((text) => {
    console.log(text);
  });

console.log(monaco.getColorizeCss("vs"));

Features

  • colorizeElement
  • colorize
  • getColorizeCss(themeName: string): string
    • Get CSS text which includes classes to colorize HTML created with colorizeElement/colorize. Theme names defined in monaco editor (vs, vs-dark, hc-black) will work.
  • getBackgroundColor(themeName: string): string
    • Get background color of editor. Theme names defined in monaco editor (vs, vs-dark, hc-black) will work.
  • tokenize
0.3.0

2 years ago

0.2.0

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago