mediawiki-extensions-CodeMi.../resources/ext.CodeMirror.js
Pavel Astakhov fd51de0222 add addon active line and set size as textarea (v 1.7.1)
Change-Id: Iecbce4695e2a31447741d1d64dd8b575fd8c3865
2014-08-27 15:33:10 +06:00

16 lines
420 B
JavaScript

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