Register

Monaco Macro Editor

An Add-on Module for Foundry Virtual Tabletop

Author: Naito Project Source: Project URL Versions 0.8.0+ (Verified 0.8.9) Last Updated 1 year, 5 months ago

Monaco Macro Editor

This module adds the Monaco Editor (the editor used in VS Code, as well as other online editors) as the macro editor in Foundry, allowing users to use a slightly slimmed down version of the editor within foundry itself. It also adds types provided by the League Of Foundry Developers to allow for a nicer scripting experience from within Foundry itself.

 

A thing to note about the module, whilst the Monaco Editor is very powerful, it could be a bit too heavy for those who are on a weaker machine, in which case I'd recommend using the Ace Macro Editor instead.

For Library/Module Developers

To make it easier to add new typings for other modules and libraries to foundry, a hook provides a function to register types. the register function takes a fake filepath and the typescript file as a string.

Hooks.on("monaco-editor.ready", (registerTypes) => {
  registerTypes("module-name/index.ts", `
    declare class Foo {
      bar (): string | null
    }
  `)
})

Categories

Available Versions

  1. Version 0.0.8

    1 year, 5 months ago
    Foundry Version 0.8.0+ (Verified 0.8.9) Manifest URL Read Notes
  2. Version 0.0.7

    Foundry Version 0.8.0+ (Verified 0.8.9) Manifest URL Read Notes
  3. Version 0.0.6

    Foundry Version 0.8.0+ (Verified 0.8.8) Manifest URL Read Notes
  4. Version 0.0.5

    Foundry Version 0.8.0+ (Verified 0.8.8) Manifest URL Read Notes
  5. Version 0.0.4

    Foundry Version 0.8.0+ (Verified 0.8.8) Manifest URL