User:Nardog/CodeEditorAssist

Did you know that pressing .mw-parser-output .keyboard-key{border:1px solid #aaa;border-radius:0.2em;box-shadow:0.1em 0.1em 0.2em rgba(0,0,0,0.1);background-col…

User:Nardog/CodeEditorAssist
CodeEditorAssist
DescriptionAllows customizing the code editor, e.g. changing the color theme and disabling live autocompletion
UpdatedApril 24, 2024
    (2 years ago)
BrowsersChrome, Firefox, etc.
SourceUser:Nardog/CodeEditorAssist.js

Did you know that pressing Ctrl+, in the code editor for CSS, JavaScript, JSON, Lua, and edit filters opens a configuration panel where you can customize the highlighting theme, keybindings, font size, wrapping style, cursor style, indentation method, undo buffers, and live autocompletion? I know, right? Or you did but you wished you could have kept your preferences across pages? Right, right. Well, you've come to the right place.

CodeEditorAssist will allow you to save your code editor preferences and automatically apply them every time you open the editor. It also adds a handy settings button to the code editor toolbar.

Installation

Add the following to your common.js or global.js:

mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Nardog/CodeEditorAssist.js&action=raw&ctype=text/javascript');

Or you may enable the script installer in Preferences → Gadgets and click "Install" in the infobox on this page.

Saving settings

Settings are saved to your global preferences. While saved settings are automatically loaded every time you open a page with the code editor, you have to hit Save in order to save them in the first place (so any changes made to the settings afterwards will not be saved, including through the default toggle buttons on the toolbar). The options "Mode" and "Read-only" are not saved.

See also

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.