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.
29 lines
844 B
29 lines
844 B
<% this.adminPage = 'raw'; %> |
|
<% include admin_header %> |
|
<form method="post"> |
|
|
|
<% include monaco-editor %> |
|
<div id="editor" class="editor" style="border: 1px solid #D4D4D5; height: 500px; margin-bottom: 20px; "> |
|
<%- this.showLoadingEditor(); %> |
|
</div> |
|
<input type="hidden" name="data"> |
|
|
|
<script type="text/javascript"> |
|
var originalData = <%- serializejs(data) %>; |
|
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()); |
|
}); |
|
}); |
|
</script> |
|
|
|
<div style="text-align: center; "> |
|
<button class="ui blue labeled icon button"><i class="ui edit icon"></i>提交</button> |
|
</div> |
|
</form> |
|
<% include admin_footer %>
|
|
|