Javascript 在EpicEditor上设置动态值
我用的是一个。下面是epiceditor初始化的代码:Javascript 在EpicEditor上设置动态值,javascript,html,editor,epiceditor,Javascript,Html,Editor,Epiceditor,我用的是一个。下面是epiceditor初始化的代码: var opts = { container: 'epiceditor', textarea: null, theme: { base: '/themes/base/epiceditor.css', preview: '/themes/preview/github.css', editor: '/themes/editor/epic-light.css' },
var opts = {
container: 'epiceditor',
textarea: null,
theme: {
base: '/themes/base/epiceditor.css',
preview: '/themes/preview/github.css',
editor: '/themes/editor/epic-light.css'
},
basePath: '/epiceditor',
clientSideStorage: false
}
var editor = new EpicEditor(opts);
editor.load();
我从数据库中获取了一些值,并希望在epicedior上显示这些值。我是epicEditor的新手,不知道该怎么做。有人能帮我吗!任何关于EpicEditor的专家 尝试将“textarea”属性设置为要将内容同步到EpicEditor的textarea字段id
我的配置如下所示:
var opts = {
container: 'epiceditor',
textarea: null,
basePath: 'epiceditor',
clientSideStorage: true,
localStorageName: 'epiceditor',
useNativeFullscreen: true,
parser: marked,
file: {
name: 'epiceditor',
defaultContent: '',
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
},
focusOnLoad: false,
shortcut: {
modifier: 18,
fullscreen: 70,
preview: 80
},
string: {
togglePreview: 'Toggle Preview Mode',
toggleEdit: 'Toggle Edit Mode',
toggleFullscreen: 'Enter Fullscreen'
}
}
var editor = new EpicEditor(opts);
您可以查看更多API。谢谢Manish!太好了!