dev

CustomizeAce is a script that allows you to conveniently apply your own custom user settings to Ace editor embeds on code pages such as CSS/JS pages and Lua modules. Unlike settings provided using Ace's built-in settings menu, all configuration made with CustomizeAce is preserved and synchronized across all devices you use.

By default, the CodeEditor extension used by MediaWiki to implement Ace allows only basic customization of session options. With this script you can alter all available options on the go.

Installation

Usage

In order to use this script you have to define window.aceCustomSettings object holding your settings. All available customization options can be found in Ace documentation on GitHub.

Themes

MediaWiki implementation of Ace comes with the following themes:

Themes

You can simply put your desired theme's name into theme field in window.aceCustomSettings object, but classic ./theme/THEMENAME syntax is supported as well.

Example configuration

window.aceCustomSettings = {
    wrap: true,
    theme: "gruvbox",
    tabSize: 2,
    showInvisibles: true
};

Using configuration options with Fandom Developers Wiki scripts

The instructions on this page describe how to use configuration options with a script. Here on the Fandom Developers Wiki, many scripts provide optional configuration settings as a mean to alter or enhance the default behavior of the script. When installing configuration options in your JavaScript file, please note that they need to go above the import statement in order to work — unless the directions say otherwise. In case MediaWiki:ImportJS is used to load the scripts, it will be executed last.

Configuration options load too late, don't work
// 1. AjaxRC import statement
importArticles({
    type: 'script',
    articles: [
        'u:dev:MediaWiki:AjaxRC.js'
    ]
});

// 2. AjaxRC configuration option
window.ajaxRefresh = 30000;
Proper placement of configuration options
// 1. AjaxRC configuration option
window.ajaxRefresh = 30000;

// 2. AjaxRC import statement
importArticles({
    type: 'script',
    articles: [
        'u:dev:MediaWiki:AjaxRC.js'
    ]
});

AbuseFilter

Although this script is supposed to be compatible with Ace embeds used by AbuseFilter extensions, due to a lack of support and technical difficulties, this feature is not available at the moment.

Text above can be found here (edit)