Browse Source

Fix HTML minify caused editor newline missing

pull/6/head
Menci 6 years ago
parent
commit
74d71ddd60
  1. 3
      views/admin_raw.ejs
  2. 3
      views/problem.ejs

3
views/admin_raw.ejs

@ -2,7 +2,8 @@
<% include admin_header %>
<form method="post" class="ui form">
<div id="editor" style="border: 1px solid #D4D4D5; height: 500px; margin-bottom: 20px; "><%= data %></div>
<div id="editor" style="border: 1px solid #D4D4D5; height: 500px; margin-bottom: 20px; "></div>
<script>$('#editor').text(<%- JSON.stringify(data) %>)</script>
<input type="hidden" name="data">
<script src="<%- lib('ace/1.4.2/ace.js') %>"></script>

3
views/problem.ejs

@ -324,7 +324,8 @@ div[class*=ace_br] {
</div>
</div>
<div class="twelve wide stretched column" style="padding-left: 0; margin-left: calc(-1rem - 1px); width: calc(75% + 1rem + 1px + 25px) !important; ">
<div id="editor" style="border: 1px solid #D4D4D5; "><% if (state) { %><%= state.code %><% } %></div>
<div id="editor" style="border: 1px solid #D4D4D5; "></div>
<% if (state) { %><script>$('#editor').text(<%- JSON.stringify(state.code) %>)</script><% } %>
</div>
<div class="inline fields" style="width: 100%; ">
<div class="field" style="margin: 0 auto; ">

Loading…
Cancel
Save