codemirror第一行换号的问题

This commit is contained in:
daiao 2017-03-26 11:01:42 +08:00
parent ab3db9ac43
commit 6594440c0d
1 changed files with 2 additions and 4 deletions

View File

@ -4,9 +4,7 @@
<form action="/myshixuns/<%= @myshixun.id %>/games/<%= @game.id %>/file_update?path=<%= @path %>" method="post" id="file_update_id" data-remote="true">
<li class="clearfix" xmlns="http://www.w3.org/1999/html" id="edit_code_contents">
<textarea class = "" id="challenge-answer-edit-small" name="content" style="height: 98%;width: 98%;">
<%= Redmine::CodesetUtil.replace_invalid_utf8(@content) %>
</textarea>
<textarea class = "" id="challenge-answer-edit-small" name="content" style="height: 98%;width: 98%;"><%= Redmine::CodesetUtil.replace_invalid_utf8(@content) %></textarea>
<script>
var text = document.getElementById("challenge-answer-edit-small");
</script>
@ -15,7 +13,7 @@
<script type="text/javascript">
var editor = CodeMirror.fromTextArea(document.getElementById("challenge-answer-edit-small"), {
mode: {name: 'text/x-java',
mode: {name: 'text/x-c++src',
version: 2,
singleLineStringErrors: false},
lineNumbers: true,