mediawiki-extensions-CodeMi.../resources/ext.CodeMirror.js
Pavel Astakhov 30a3ae4319 add highlighting double underscore Magic words (v 1.12.0)
Change-Id: I4eceaa790ca053de49f5d0983bdd8ae288ba985f
2014-09-04 10:23:05 +06:00

19 lines
628 B
JavaScript

/*global CodeMirror, mw*/
jQuery( document ).ready( function ( $ ) {
var textbox1 = $( '#wpTextbox1' );
var codeMirror = CodeMirror.fromTextArea( textbox1[0], {
mwextFunctionSynonyms: mw.config.get( 'extCodeMirrorFunctionSynonyms' ),
mwextTags: mw.config.get( 'extCodeMirrorTags' ),
mwextDoubleUnderscore: mw.config.get( 'extCodeMirrorDoubleUnderscore' ),
styleActiveLine: true,
//lineNumbers: true,
lineWrapping: true,
//indentUnit: 4,
//indentWithTabs: true
//matchBrackets: true,
//autoCloseBrackets: true,
mode: 'text/mediawiki'
} );
codeMirror.setSize( null, textbox1.height() );
} );