Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F1427065
ext.codeEditor.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
ext.codeEditor.js
View Options
/**
* MediaWiki:Gadget-codeeditor.js
* (c) 2011 Brion Vibber <brion @ pobox.com>
* GPLv2 or later
*
* Syntax highlighting, auto-indenting code editor widget for on-wiki JS and CSS pages.
* Uses embedded Ajax.org Cloud9 Editor: https://ace.c9.io/
*
* Known issues:
* - extension version doesn't have optional bits correct
* - ties into WikiEditor, so doesn't work on classic toolbar
* - background worker for JS syntax check doesn't load in non-debug mode (probably also fails if extension assets are offsite)
* - copy/paste not available from context menu (Firefox, Chrome on Linux -- kbd & main menu commands ok)
* - accessibility: tab/shift-tab are overridden. is there a consistent alternative for keyboard-reliant users?
* - accessibility: accesskey on the original textarea needs to be moved over or otherwise handled
* - scrollbar initializes too wide; need to trigger resize check after that's filled
*/
/*
* JavaScript for WikiEditor Table of Contents
*/
$
(
function
()
{
// eslint-disable-next-line no-jquery/no-global-selector
var
$wpTextbox1
=
$
(
'#wpTextbox1'
);
// Code is supposed to be always LTR. See bug 39364.
$wpTextbox1
.
parent
().
prop
(
'dir'
,
'ltr'
);
// Add code editor module
$wpTextbox1
.
wikiEditor
(
'addModule'
,
'codeEditor'
);
$wpTextbox1
.
on
(
'wikiEditor-toolbar-doneInitialSections'
,
function
()
{
$wpTextbox1
.
data
(
'wikiEditor-context'
).
fn
.
codeEditorMonitorFragment
();
}
);
}
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, May 16, 14:09 (1 d, 6 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
f7/a4/5663310c41f90f6087f64b8c89f1
Default Alt Text
ext.codeEditor.js (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment