Closed sessionboy closed 5 years ago
@sessionboy if i correctly understand Dante code the problem is that Dante do not pass DraftJS (under the hood) onChange event which contains editableContent state of editor instanse=(
@sessionboy maybe this will helps
data_storage="{ interval: 1500, url: '/store', method: 'POST', save_handler: (editorContext, content) => { // make custom request }, }"
@sessionboy maybe this will helps
data_storage="{ interval: 1500, url: '/store', method: 'POST', save_handler: (editorContext, content) => { // make custom request }, }"
thank you, but that's going to keep sending requests, and I don't need to do that, and my backend API is graphql, It's not appropriate
Hi @sessionboy . if you keep the data_storage.url and data_storage.save_handler with a null value the automatic store will not be triggered and implement your own logic.
hint: check the emitSerializedOutput()
function file to get the editor content to implement your GQ post
@sessionboy I've released the 0.5.0-rc7 version it supports a onChange callback that returns the entire instance of the editor, examples added in https://michelson.github.io/dante2/#/src-index (search for onChange callback)
thanks for report this. reopen this issue if needed
hi! Each update triggers a request, but I don't want that; I want the freedom to get the editor's content and submit the data using custom requests. But it doesn't seem to be right now.