Closed ThinkDevStudios closed 2 years ago
@ThinkDevStudios Hi! First of all, thanks for your interest! 👋
onChange doesn't works with promises. If you want to use promise, follow the code below.
const handleChange = React.useCallback(() => {
editorCore.current.save().then(savedData => { ... });
}, []);
Thanks!
Environment
"@editorjs/checklist": "^1.3.0", "@editorjs/code": "^2.7.0", "@editorjs/delimiter": "^1.2.0", "@editorjs/editorjs": "^2.22.2", "@editorjs/embed": "^2.5.0", "@editorjs/header": "^2.6.2", "@editorjs/image": "^2.6.2", "@editorjs/inline-code": "^1.3.1", "@editorjs/link": "^2.4.0", "@editorjs/list": "^1.6.2", "@editorjs/marker": "^1.2.2", "@editorjs/paragraph": "^2.8.0", "@editorjs/quote": "^2.4.0", "@editorjs/raw": "^2.3.0", "@editorjs/simple-image": "^1.4.1", "@editorjs/table": "^2.0.1", "@editorjs/warning": "^1.2.0", "editorjs-button": "^1.0.4",
Describe
When saving the editor via onChange, when i do a console.log of the current instance. It does not seem to update the blocks data.