mediawiki-extensions-CodeMi.../resources/ext.CodeMirror.js
Pavel Astakhov b9f40490f3 add highlighting extension tags (v 1.11.0)
* fix some bugs...

Change-Id: Icf7eb836c6fbe3a686d67355064f57a6199d6b22
2014-09-03 11:04:56 +06:00

18 lines
552 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' ),
styleActiveLine: true,
//lineNumbers: true,
lineWrapping: true,
//indentUnit: 4,
//indentWithTabs: true
//matchBrackets: true,
//autoCloseBrackets: true,
mode: 'text/mediawiki'
} );
codeMirror.setSize( null, textbox1.height() );
} );