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.

30 lines
844 B

7 years ago
<% this.adminPage = 'raw'; %>
<% include admin_header %>
<form method="post">
7 years ago
<% include monaco-editor %>
<div id="editor" class="editor" style="border: 1px solid #D4D4D5; height: 500px; margin-bottom: 20px; ">
<%- this.showLoadingEditor(); %>
</div>
7 years ago
<input type="hidden" name="data">
<script type="text/javascript">
var originalData = <%- serializejs(data) %>;
7 years ago
var input = $('[name="data"]');
input.val(originalData);
window.onEditorLoaded(function () {
var editor;
window.editor = editor = window.createCodeEditor(document.getElementById("editor"), "json", originalData);
$('form').on('submit', function () {
input.val(editor.getValue());
});
7 years ago
});
</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 %>