Авг
17
2014
17
2014
CodeMirror подключаем по class а не по id
<section class="pattern"> <textarea class='codemirror'> <script> $(function(){ var tAreas = document.querySelectorAll('.codemirror'); for (var i = 0; i < tAreas.length; i++) { CodeMirror.fromTextArea(tAreas[i], { mode: "application/x-httpd-php", tabMode: 'indent', lineNumbers: true, autoCloseTags: true, styleActiveLine: true, matchBrackets: true }); } }); </script> </textarea> <textarea class='codemirror' > var myModule = function(){ //code goes here } </textarea> </section>
Метки: java, javascript