-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add onReady property #91
feat: add onReady property #91
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow! First-time contributor! 🤝
This proposal is very good. If you don't mind, can you update README.md?
.gitignore
Outdated
@@ -1,2 +1,3 @@ | |||
node_modules | |||
.rpt2_cache | |||
.idea |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please delete this line. .idea
directory is required only InteliJ users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I deleted .idea
and updated info in README.md.
Thank you for reviewing this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll merge this pr. Thank you for your nice work 👍
@@ -60,6 +60,7 @@ Allow all options of [editor-js](https://github.com/codex-team/editor.js/blob/ma | |||
| enableReInitialize | Boolean | Change editor-js data when componentDidUpdate | | |||
| onChange | (api: API, newData: OutputData) => void | Fires when something changed in DOM | | |||
| onCompareBlocks | (newBlocks?: OutputData['blocks'], oldBlocks?: OutputData['blocks']) => boolean | Use to avoid Infinite update when enableReInitialize used with onChange ([Recommended Library](https://github.com/FormidableLabs/react-fast-compare)) | | |||
| onReady | (instance?: EditorJS) => void | Use to execute callback when editor-js instance has initialized | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
## [1.9.0](1.8.0...1.9.0) (2021-01-27) ### Features * add onReady property ([#91](#91)) ([d243539](d243539))
🎉 This PR is included in version 1.9.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Hello.
Thank you for this library - it helps me a lot!
I guess it would be great feature to add "onReady" property - to have possibility to use editor modifiactions callback.
https://editorjs.io/configuration#editor-modifications-callback
It can be useful with other editorjs plugins. (for example this one - https://github.com/kommitters/editorjs-undo)