我看的EpicEditor官网中的介绍,按照他的配置和使用方法。但是根本没有反应。好苦恼啊!
$(function(){
var opts = {
container: 'epiceditor',
textArea: null,
basePath: '../javascripts/EpicEditor',
clientSideStorage: true,
localStorageName: 'epiceditor',
useNativeFullScreen: true,
parser: marked,
file: {
name: 'epiceditor',
defaultContent: 'abc',
autoSave: 100
},
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: false,
shortcut: {
modifier: 18,
fullScreen: 70,
preview: 80
},
string: {
togglePreview: 'Toggle Preview Mode',
toggleEdit: 'Toggle Edit Mode',
toggleFullScreen: 'Enter Fullscreen'
},
autoGrow: false
}
var editor = new EpicEditor(opts);
});
求大神们看看到底咋回事?
1 回复
…/javascripts/EpicEditor’ 这个可能需要改成绝对路径 /javascripts/EpicEditor’ 另外需要调用一下 editor.load() 可以参考一下这个https://github.com/tguitar/epiceditor-demo