Ace Library
A downloadable foundry vtt package
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.
<span class="hljs-attribute">editor</span> = ace.edit(document.getElementById(<span class="hljs-string">"the-id-of-the-div"</span>))<span class="hljs-comment">;</span>
This will set the Ace options to the ones that the user has configured in module settings.
<span class="hljs-selector-tag">editor</span><span class="hljs-selector-class">.setOptions</span>(<span class="hljs-selector-tag">ace</span><span class="hljs-selector-class">.userSettings</span>);
Set the editor's contents
editor.setValue(<span class="hljs-string">"initial value"</span>)<span class="hljs-comment">;</span>
Get the editor's contents
editor.getValue()<span class="hljs-comment">;</span>
Status | Released |
Category | Other |
Author | arcanistzed |
Tags | foundry-vtt |
Code license | MIT License |
Average session | A few seconds |
Languages | English, French |
Download
Download
Manifest
External
Install instructions
In the setup screen, use the URL https://raw.githubusercontent.com/arcanistzed/acelib/main/module.json to install the module.
Leave a comment
Log in with itch.io to leave a comment.