Skip to content

bhsd-harry/monaco-wiki

Repository files navigation

Monaco-Wiki

npm version CodeQL

Monaco-Wiki registers the Wikitext language in the Monaco Editor. It is a web version of the Visual Studio Code extensions developed by Rowe Wilson Frederisk Holme and Bhsd.

Usage

You may load the Monaco Editor on your own:

import * as monaco from 'https://cdn.jsdelivr.net/npm/monaco-editor/+esm';
import registerWiki from 'https://cdn.jsdelivr.net/npm/monaco-wiki';

await registerWiki(
	monaco,
	false, // Set to `true` if used in a MediaWiki site
);

or simply:

// Automatically loads the Monaco Editor's core and relevant workers
import 'https://cdn.jsdelivr.net/npm/monaco-wiki/dist/all.min.js';

await monaco; // The global `monaco` is a promise that resolves to the Monaco editor

Language Aliases

  • wikitext
  • wiki
  • mediawiki

Themes

Name ID
Monokai monokai
Nord nord

If you wish to use other themes listed here, please submit a feature request.

GNU General Public License 3.0