Closed weaming closed 8 years ago
JS file:
function markdown() {
var post_text = $('#post-text').html();
var opts = {
container: 'epiceditor',
textarea: 'epiceditor-text',
basePath: '../static/epiceditor',
clientSideStorage: false,
localStorageName: 'epiceditor',
useNativeFullscreen: true,
parser: marked,
file: {
name: 'epiceditor',
defaultContent: post_text,
autoSave: true
},
theme: {
base: '/themes/base/epiceditor.css',
preview: '/themes/preview/preview-dark.css',
editor: '/themes/editor/epic-dark.css'
},
button: {
preview: true,
fullscreen: true,
bar: "auto"
},
focusOnLoad: true,
shortcut: {
modifier: 18,
fullscreen: 70,
preview: 80
},
string: {
togglePreview: '预览',
toggleEdit: '编辑',
toggleFullscreen: '全屏'
},
autogrow: false
};
//var editor = new EpicEditor().load();
var editor = new EpicEditor(opts);
editor.load();
}
$(document).ready(
markdown()
);
HTML file:
<div class="post_text">
<div id="epiceditor">
<textarea id="post-text">{{ post.text }}</textarea>
<textarea id="epiceditor-text">epiceditor-text</textarea>
</div>
</div>
@OscarGodson Just like this!
Check your network tab in Chrome Developer tools to see which requests are still outstanding, that should elaborate what is really happening.
after put it in page, when I open this page, the status showed on the browser tab is loading ALL THE TIME! For this reason, I can't see my page logo.
what's the cause of this problem? How can I fix it ?