|
|
|
<% 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 %>
|