add C/C++ syntax highlighting
This commit is contained in:
parent
3da587e6e3
commit
ba42042013
5 changed files with 333 additions and 4 deletions
17
editor.html
17
editor.html
|
|
@ -21,6 +21,7 @@
|
|||
<option value="php">PHP Document</option>
|
||||
<option value="java">Java Document</option>
|
||||
<option value="ruby">Ruby Document</option>
|
||||
<option value="c_cpp">C++ Document</option>
|
||||
<option value="plain">Text Document</option>
|
||||
</select>
|
||||
</td>
|
||||
|
|
@ -76,6 +77,7 @@
|
|||
<option value="php">PHP</option>
|
||||
<option value="java">Java</option>
|
||||
<option value="ruby">Ruby</option>
|
||||
<option value="c_cpp">C/C++ Document</option>
|
||||
</select>
|
||||
</td>
|
||||
<td align="right">
|
||||
|
|
@ -221,6 +223,21 @@ def fact(n)
|
|||
end
|
||||
|
||||
puts fact(ARGV[0].to_i)
|
||||
</script>
|
||||
|
||||
<script type="text/editor" id="cpptext">// compound assignment operators
|
||||
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
int main ()
|
||||
{
|
||||
int a, b=3; /* foobar */
|
||||
a = b;
|
||||
a+=2; // equivalent to a=a+2
|
||||
cout << a;
|
||||
return 0;
|
||||
}
|
||||
</script>
|
||||
|
||||
<input id="cockpitInput" type="text"/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue