The configuration of the DataFacade.

ClassicEditor
.create(editorElement, {
autosave: {
save( editor: Editor ): Promise<unknown> {
// Typically skipped. Use `dataFacade` instead.
},
// Waiting time configured here, will then forward to `dataFacade`.
waitingTime: 2000,
}
});
.then( ... )
.catch( ... );
interface DataFacadeConfig {
    save?: Save;
}

Properties

Properties

save?: Save

The callback to be executed when the data needs to be saved.

This function must return a promise that should be resolved when the data is successfully saved.

ClassicEditor
.create(editorElement, {
dataFacade: {
save(dataApi: GetDataApi) {
return saveData(dataApi.getData());
},
},
});
.then( ... )
.catch( ... );