Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4068829
ve.ui.CodeMirror.init.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
905 B
Referenced Files
None
Subscribers
None
ve.ui.CodeMirror.init.js
View Options
require
(
'../ext.CodeMirror.data.js'
);
// This is hacky: mw.hook ensures that new handlers would be fired immediately if they are
// added after the event. We are using this feature to load the actual module via a callback
// when this module is loaded by VE.
//
// TODO: Change the PluginModules in extension.json when fully migrated to v6 and drop this.
mw
.
hook
(
've.loadModules'
).
add
(
(
addPlugin
)
=>
{
const
urlParams
=
new
URLSearchParams
(
window
.
location
.
search
);
const
shouldUseV6
=
mw
.
config
.
get
(
'extCodeMirrorConfig'
).
useV6
||
urlParams
.
get
(
'cm6enable'
)
||
mw
.
user
.
options
.
get
(
'codemirror-beta-feature-enable'
)
===
'1'
;
// VE would wait for plugin callbacks to resolve before initialisation.
if
(
shouldUseV6
)
{
addPlugin
(
()
=>
mw
.
loader
.
using
(
'ext.CodeMirror.v6.visualEditor'
)
);
}
else
{
addPlugin
(
()
=>
mw
.
loader
.
using
(
'ext.CodeMirror.visualEditor'
)
);
}
}
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Aug 16 2026, 20:51 (11 w, 5 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
36/eb/d6212ca7e11e1ca96ce6bdf96de2
Default Alt Text
ve.ui.CodeMirror.init.js (905 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment