0.0.1 • Published 2 years ago

monaco-qb v0.0.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

monaco-qb

QBasic / QuickBASIC syntax highlighting for the Monaco editor.

Usage

Install from NPM:

npm install monaco-qb

To enable QBasic / QuickBASIC mode in Monaco, simply import the monaco-qb package and specify qb as the language when creating an editor instance:

import * as monaco from 'monaco-editor';
import 'monaco-qb';

const editor = monaco.editor.create(document.getElementById('editor')!, {
  value: '',
  language: 'qb',
  // ...
});

Alternatively, you can import and set up monaco-qb lazily:

import {setupLanguage} from 'monaco-qb/qb';
// This will register the 'qb' language with Monaco.
setupLanguage();

Examples

For a basic example of monaco-qb usage, see src/demo.

For a live example, please check out the qbjc playground (👉 qbjc.dev 👈) which allows you to edit and run QBasic / QuickBASIC programs directly in the browser.