Register

Ace Library

An Add-on Module for Foundry Virtual Tabletop

Author: arcanist Project Source: Project URL Versions 0.7.9+ (Verified 10) Last Updated 2 years, 3 months ago

Version Latest Release Download Count Supported Foundry Versions Discord Server Patreon

A library module for using the Ace editor in Foundry VTT.

Usage

To easily add an Ace editor, you can create a <div> and use ace.edit to initialize. You can create multiple editors at once with this method.

let editor = ace.edit("the-id-of-the-div");

This will set the Ace options to the ones that the user has configured in module settings.

editor.setOptions(ace.userSettings);

Set the editor's contents

editor.setValue("initial value");

Get the editor's contents

editor.getValue();

Instructions for customizing each editor individually are available on the official guide which has examples of how to set various options. This is useful when you need an editor to work a certain way (e.g. force the use of JSON), but should be used sparingly since it robs the user of their choice. These will override the user's choices. Different editors can use different options even if they are open simultaneously.

Using Ace

Press Ctrl+Alt+h or Cmd+Alt+h to view a list of all the keyboard shortcuts available. You can access the command palette by pressing F1 while focusing on the editor.


Come hang out on my Discord server if you have questions, suggestions, or need help.

Categories

Available Versions

  1. Version 1.8.3

    2 years, 3 months ago
    Foundry Version 0.7.9+ (Verified 10) Manifest URL Read Notes
  2. Version 1.7.0

    Foundry Version 0.7.9+ (Verified 10) Manifest URL Read Notes
  3. Version 1.6.1

    Foundry Version 0.7.9+ (Verified 10) Manifest URL Read Notes
  4. Version 1.6.0

    Foundry Version 0.7.9+ (Verified 10) Manifest URL Read Notes
  5. Version 1.5.0

    Foundry Version 0.7.9+ (Verified 10) Manifest URL Read Notes
  6. Version 1.4.0

    Foundry Version 0.7.9+ (Verified 10) Manifest URL Read Notes
  7. Version 1.3.0

    Foundry Version 0.7.9+ (Verified 9) Manifest URL Read Notes