Вход Регистрация
* Призрак

Подсветка кода

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Masteram.Us</title>
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <link rel="stylesheet" href="http://codemirror.net/lib/codemirror.css" />
  7. <script src="https://codemirror.net/lib/codemirror.js"></script>
  8. <script src="https://codemirror.net/addon/edit/matchbrackets.js"></script>
  9. <script src="https://codemirror.net/mode/htmlmixed/htmlmixed.js"></script>
  10. <script src="https://codemirror.net/mode/xml/xml.js"></script>
  11. <script src="https://codemirror.net/mode/javascript/javascript.js"></script>
  12. <script src="https://codemirror.net/mode/css/css.js"></script>
  13. <script src="https://codemirror.net/mode/clike/clike.js"></script>
  14. <script src="https://codemirror.net/mode/php/php.js"></script>
  15. </head>
  16. <body>
  17. <textarea id="code" name="code"></textarea>
  18. <script>
  19. var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
  20. lineNumbers: true,
  21. matchBrackets: true,
  22. mode: "application/x-httpd-php",
  23. indentUnit: 4,
  24. indentWithTabs: true
  25. });
  26. </script>
  27. </body>
  28. </html>
» Описание: Подсветка кода,с номерами строк в textarea
» Время добавления: 21 Янв 2016 в 23:03
» Посмотров: 2309
» textarea
» Рейтинг: [+1 | -0]
Комментарии [2]
Онлайн: 1
Реклама