Преглед на файлове

fix:修复文章被转义的问题

lifei6671 преди 7 години
родител
ревизия
886cacdafa
променени са 2 файла, в които са добавени 2 реда и са изтрити 6 реда
  1. 0 4
      static/js/blog.js
  2. 2 2
      views/blog/manage_edit.tpl

+ 0 - 4
static/js/blog.js

@@ -42,7 +42,6 @@ $(function () {
             };
             this.addKeyMap(keyMap);
 
-            console.log("加载完成")
             uploadImage("docEditor", function ($state, $res) {
                 console.log("注册上传图片")
                 if ($state === "before") {
@@ -56,9 +55,6 @@ $(function () {
                     }
                 }
             });
-            window.isLoad = true;
-            this.insertValue($("#blogRawMarkdown").html());
-            this.setCursor({ line: 0, ch: 0 });
         },
         onchange: function () {
             resetEditorChanged(true);

+ 2 - 2
views/blog/manage_edit.tpl

@@ -91,7 +91,7 @@
     <div class="manual-body">
         <div class="manual-editor-container" id="manualEditorContainer" style="min-width: 920px;left: 0;">
             <div class="manual-editormd">
-                <div id="docEditor" class="manual-editormd-active"></div>
+                <div id="docEditor" class="manual-editormd-active"><textarea style="display: none">{{.Model.BlogContent}}</textarea> </div>
             </div>
             <div class="manual-editor-status">
                 <div id="attachInfo" class="item">0 个附件</div>
@@ -100,7 +100,7 @@
 
     </div>
 </div>
-<script type="text/x-markdown"  id="blogRawMarkdown">{{.Model.BlogContent}}</script>
+
 <!-- Modal -->
 
 <div class="modal fade" id="uploadAttachModal" tabindex="-1" role="dialog" aria-labelledby="uploadAttachModalLabel">