我有一个与CKEditor集成的角度代码。我需要使用CKEDITOR AUTOSAVE插件自动保存用户数据
const autosave = this.editor.plugins.get('Autosave');
autosave.adapter = {
save() {
const data = this.editor.getData();
return wait(1000)
.then(() => console.log(`Saved content: ${data}`));
}
};
autosave.listenTo(autosave, 'change:state',
(evt, propName, newValue, oldValue) => console.log(`Changed state: ${oldValue} -> ${newValue}`));
我希望数据保存为用户类型