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:
- ambiance
- chaos
- chrome
- clouds
- clouds_midnight
- cobalt
- crimson_editor
- dawn
- dracula
- dreamweaver
- eclipse
- github
- gob
- gruvbox
- idle_fingers
- iplastic
- katzenmilch
- kr_theme
- kuroir
- merbivore
- merbivore_soft
- mono_industrial
- monokai
- nord_dark
- pastel_on_dark
- solarized_dark
- solarized_light
- sqlserver
- terminal
- textmate
- tomorrow
- tomorrow_night
- tomorrow_night_blue
- tomorrow_night_bright
- tomorrow_night_eighties
- twilight
- vibrant_ink
- xcode
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.
// 1. AjaxRC import statement
importArticles({
type: 'script',
articles: [
'u:dev:MediaWiki:AjaxRC.js'
]
});
// 2. AjaxRC configuration option
window.ajaxRefresh = 30000;
// 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.