2
0

activeline.html 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>CodeMirror: Active Line Demo</title>
  6. <link rel="stylesheet" href="../lib/codemirror.css">
  7. <script src="../lib/codemirror.js"></script>
  8. <script src="../mode/xml/xml.js"></script>
  9. <script src="../addon/selection/active-line.js"></script>
  10. <link rel="stylesheet" href="../doc/docs.css">
  11. <style type="text/css">
  12. .CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
  13. .CodeMirror-activeline-background {background: #e8f2ff !important;}
  14. </style>
  15. </head>
  16. <body>
  17. <h1>CodeMirror: Active Line Demo</h1>
  18. <form><textarea id="code" name="code">
  19. <?xml version="1.0" encoding="UTF-8"?>
  20. <rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"
  21. xmlns:georss="http://www.georss.org/georss"
  22. xmlns:twitter="http://api.twitter.com">
  23. <channel>
  24. <title>Twitter / codemirror</title>
  25. <link>http://twitter.com/codemirror</link>
  26. <atom:link type="application/rss+xml"
  27. href="http://twitter.com/statuses/user_timeline/242283288.rss" rel="self"/>
  28. <description>Twitter updates from CodeMirror / codemirror.</description>
  29. <language>en-us</language>
  30. <ttl>40</ttl>
  31. <item>
  32. <title>codemirror: http://cloud-ide.com &#8212; they're springing up like mushrooms. This one
  33. uses CodeMirror as its editor.</title>
  34. <description>codemirror: http://cloud-ide.com &#8212; they're springing up like mushrooms. This
  35. one uses CodeMirror as its editor.</description>
  36. <pubDate>Thu, 17 Mar 2011 23:34:47 +0000</pubDate>
  37. <guid>http://twitter.com/codemirror/statuses/48527733722058752</guid>
  38. <link>http://twitter.com/codemirror/statuses/48527733722058752</link>
  39. <twitter:source>web</twitter:source>
  40. <twitter:place/>
  41. </item>
  42. <item>
  43. <title>codemirror: Posted a description of the CodeMirror 2 internals at
  44. http://codemirror.net/2/internals.html</title>
  45. <description>codemirror: Posted a description of the CodeMirror 2 internals at
  46. http://codemirror.net/2/internals.html</description>
  47. <pubDate>Wed, 02 Mar 2011 12:15:09 +0000</pubDate>
  48. <guid>http://twitter.com/codemirror/statuses/42920879788789760</guid>
  49. <link>http://twitter.com/codemirror/statuses/42920879788789760</link>
  50. <twitter:source>web</twitter:source>
  51. <twitter:place/>
  52. </item>
  53. </channel>
  54. </rss></textarea></form>
  55. <script>
  56. var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
  57. mode: "application/xml",
  58. styleActiveLine: true,
  59. lineNumbers: true,
  60. lineWrapping: true
  61. });
  62. </script>
  63. <p>Styling the current cursor line.</p>
  64. </body>
  65. </html>