mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-13 17:27:42 +00:00
Fix conflict with the CodeEditor extension (v 3.2.3)
CodeMirror will be not initialized if CodeEditor is used Change-Id: I78ab2814beb0e40a878f6a02b7d3967c216afce6
This commit is contained in:
parent
0cc7a8d635
commit
82f8acd450
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "CodeMirror",
|
||||
"version": "3.2.2",
|
||||
"version": "3.2.3",
|
||||
"author": [
|
||||
"[https://www.mediawiki.org/wiki/User:Pastakhov Pavel Astakhov]",
|
||||
"[https://www.mediawiki.org/wiki/User:Florianschmidtwelzow Florian Schmidt]"
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
/* global CodeMirror, mediaWiki */
|
||||
( function ( mw, $ ) {
|
||||
if ( mw.config.get( 'wgCodeEditorCurrentLanguage' ) ) { // If the CodeEditor is used then just exit;
|
||||
return;
|
||||
}
|
||||
|
||||
// codeMirror needs a special textselection jQuery function to work, save the current one to restore when
|
||||
// CodeMirror get's disabled.
|
||||
var origTextSelection = $.fn.textSelection,
|
||||
|
|
Loading…
Reference in a new issue