Adding the ability to add tabs to documentation and issue editing

Adding the ability to have syntax highlighted wiki (ie documentation)
ex:

<pre class="prettyprint">
int main()
{
	cout << "test" << endl;
}
</pre>
This commit is contained in:
Nathan Adams
2013-08-01 22:28:19 -05:00
parent 2f981e42e5
commit 7ebce22300
5 changed files with 25 additions and 10 deletions

View File

@@ -0,0 +1,11 @@
$("textarea").keydown(function(e) {
var $this, end, start;
if (e.keyCode === 9) {
start = this.selectionStart;
end = this.selectionEnd;
$this = $(this);
$this.val($this.val().substring(0, start) + "\t" + $this.val().substring(end));
this.selectionStart = this.selectionEnd = start + 1;
return false;
}
});