monaco-editor-with-textmate
TypeScript icon, indicating that this package has built-in type declarations

1.0.11 • Public • Published

monaco-editor-with-textmate

This gets TextMate grammars working in standalone Monaco by leveraging vscode-oniguruma and vscode-textmate. For more context

Install

yarn add monaco-editor-with-textmate

Usage

import { create, Editor } from 'monaco-editor-with-textmate';

// create editor
const editor = await create(document.getElementById('container'), {
  value: '{}',
  language: 'json',
});

//react
export default () => {
  return (
    <Editor
      onChange={(v) => {
        console.log(v);
      }}
      options={{ language: 'javascript' }}
      value={value}
      height="500px"
    />
  );
};

Documents

read the type definition from index.d.ts;

Readme

Keywords

none

Package Sidebar

Install

npm i monaco-editor-with-textmate

Weekly Downloads

9

Version

1.0.11

License

MIT

Unpacked Size

108 kB

Total Files

5

Last publish

Collaborators

  • weiming123
  • ming.wei