All user data for FoundryVTT. Includes worlds, systems, modules, and any asset in the "foundryuserdata" directory. Does NOT include the FoundryVTT installation itself.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

3.3 KiB

Ace Library

Version Latest Release Download Count Supported Foundry Versions Discord Server Patreon

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

This library is currently being used by

Let me know and I will add your module to the list.

Installation

In the setup screen, use the URL https://github.com/arcanistzed/acelib/releases/latest/download/module.json to install the module.

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.

Support

Please consider supporting me on my Patreon if you like my work. You can see a list of all my projects on my website.

Bugs

You can submit bugs via Github Issues or on my Discord server.

Contact me

Come hang out on my my Discord server or click here to send me an email.

License

Copyright © 2021 arcanist

This package is under an MIT license and the Foundry Virtual Tabletop Limited License Agreement for module development while Ace Editor is under a BSD license.