算法评测平台前端。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.1 KiB

7 years ago
<% this.adminPage = 'raw'; %>
<% include admin_header %>
<form method="post" class="ui form">
<div id="editor" style="border: 1px solid #D4D4D5; height: 500px; margin-bottom: 20px; "><%= data %></div>
<input type="hidden" name="data">
<script src="<%- lib('ace/1.4.2/ace.js') %>"></script>
7 years ago
<script type="text/javascript">
var editor = ace.edit("editor");
editor.setTheme("ace/theme/tomorrow");
editor.getSession().setMode("ace/mode/json");
editor.getSession().setUseSoftTabs(false);
editor.container.name = 'data';
editor.container.style.lineHeight = 1.6;
editor.container.style.fontSize = '14px';
editor.container.style.fontFamily = "'Roboto Mono', 'Bitstream Vera Sans Mono', 'Menlo', 'Consolas', 'Lucida Console', monospace";
editor.setShowPrintMargin(false);
editor.renderer.updateFontSize();
var input = $('[name="data"]');
editor.getSession().on("change", function () {
input.val(editor.getSession().getValue());
});
</script>
<div style="text-align: center; ">
<button class="ui blue labeled icon button"><i class="ui edit icon"></i>提交</button>
7 years ago
</div>
</form>
<% include admin_footer %>