monaco-editor-with-textmate
v1.0.11
Published
use monaco-editor with textmate
Downloads
31
Readme
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;