【发布时间】:2016-02-09 15:21:12
【问题描述】:
我的网页上有 3 个 EpicEditor,每个都包含与数据库中某个对象的属性相关的文本。当我更新文本时,我看到 localStorage 得到了更新。但我想做的是将更改保存到我的数据库中。
从文档中,有一个 exportFile 事件:
syncWithServerBtn.onclick = function () {
var theContent = editor.exportFile();
saveToServerAjaxCall('/save', {data:theContent}, function () {
console.log('Data was saved to the database.');
});
}
这是如何工作的?真的有syncWithServer 按钮吗?我看到的只是预览和全屏按钮。
我想这意味着我的视图中必须有一个“/保存”路线。如何在此视图中访问 theContent(更新的内容)?
【问题讨论】:
标签: epiceditor