Explorar o código

change contentDiv get elementById editor_block

weichen %!s(int64=4) %!d(string=hai) anos
pai
achega
ee1c3547a7
Modificáronse 2 ficheiros con 4 adicións e 4 borrados
  1. 1 1
      backstage/static/js/editor.js
  2. 3 3
      backstage/templates/editor.html

+ 1 - 1
backstage/static/js/editor.js

@@ -12,7 +12,7 @@ function isIndexExistInBlockArray(blockIndex, length) {
 }
 
 
-const contentDiv = document.getElementsByClassName('ui segment')[0];
+const contentDiv = document.getElementById('editor_block');
 const titleButton = document.getElementById('title_button');
 const submitButton = document.getElementById('submit_button');
 axios.get('/static/公仔與爵士鼓.md').then(function(response) {

+ 3 - 3
backstage/templates/editor.html

@@ -4,15 +4,15 @@
     <div class="ui two column very relaxed grid">
       <div class="column">
         <div>
-          <button id='title_button'>Title</button>
+          <button id="title_button">Title</button>
         </div>
-          <div class="ui segment"></div>
+          <div id= "editor_block" class="ui segment"></div>
         <button id='submit_button'>Submit</button>
         <script type="text/javascript" src="{{url_for('static', filename='js/blockElements.js')}}"></script>
         <script type="text/javascript" src="{{url_for('static', filename='js/parsers.js')}}"></script>
         <script type="text/javascript" src="{{url_for('static', filename='js/editor.js')}}"></script>
       </div>
-      <div class="column" data-include="preview">
+      <div class="column">
         <iframe src='http://localhost:1313/collection/doll_and_drum_set/' width="100%" height="100%"></iframe>
       </div>
     </div>