mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-27 15:40:00 +00:00
fix readonly state and TextSelection (v 3.1.2)
Bug: T95149 Bug: T95150 Change-Id: Ia8660d5c2a6dca6a2a37bc60e36620f48aad3260
This commit is contained in:
parent
c800aab7e7
commit
ba5a12a679
|
@ -15,7 +15,7 @@ if ( !defined( 'MEDIAWIKI' ) ) {
|
|||
die( 'This file is an extension to MediaWiki and thus not a valid entry point.' );
|
||||
}
|
||||
|
||||
const EXT_CODEMIRROR_VERSION = '3.1.1';
|
||||
const EXT_CODEMIRROR_VERSION = '3.1.2';
|
||||
|
||||
// Register this extension on Special:Version
|
||||
$wgExtensionCredits['parserhook'][] = array(
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
api = new mw.Api(),
|
||||
// function for a textselection function for CodeMirror
|
||||
cmTextSelection = function ( command, options ) {
|
||||
if ( !codeMirror ) {
|
||||
return origTextSelection( command, options );
|
||||
if ( !codeMirror || codeMirror.getTextArea() !== this[0] ) {
|
||||
return origTextSelection.call( this, command, options );
|
||||
}
|
||||
var fn, retval;
|
||||
|
||||
|
@ -295,6 +295,7 @@
|
|||
mwextModes: mw.config.get( 'extCodeMirrorExtModes' ),
|
||||
styleActiveLine: true,
|
||||
lineWrapping: true,
|
||||
readOnly: textbox1[0].readOnly,
|
||||
// select mediawiki as text input mode
|
||||
mode: 'text/mediawiki'
|
||||
} );
|
||||
|
|
Loading…
Reference in a new issue