Skip to content
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

Merged
merged 3 commits into from
Jan 27, 2021
Merged

feat: add onReady property #91

merged 3 commits into from
Jan 27, 2021

Conversation

vault-developer
Copy link
Contributor

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)

Copy link
Owner

@Jungwoo-An Jungwoo-An left a 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
Copy link
Owner

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.

Copy link
Contributor Author

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.

@Jungwoo-An Jungwoo-An self-assigned this Jan 25, 2021
@Jungwoo-An Jungwoo-An added the enhancement New feature or request label Jan 25, 2021
Copy link
Owner

@Jungwoo-An Jungwoo-An left a 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 |
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Jungwoo-An Jungwoo-An changed the title feature: add onReady property feat: add onReady property Jan 27, 2021
@Jungwoo-An Jungwoo-An merged commit d243539 into Jungwoo-An:master Jan 27, 2021
Jungwoo-An pushed a commit that referenced this pull request Jan 27, 2021
## [1.9.0](1.8.0...1.9.0) (2021-01-27)

### Features

* add onReady property ([#91](#91)) ([d243539](d243539))
@Jungwoo-An
Copy link
Owner

🎉 This PR is included in version 1.9.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants