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

Can the block and tune components communicate with each other #2747

Open
chf-gh opened this issue Jun 28, 2024 · 0 comments
Open

Can the block and tune components communicate with each other #2747

chf-gh opened this issue Jun 28, 2024 · 0 comments

Comments

@chf-gh
Copy link

chf-gh commented Jun 28, 2024

The first problem is that the block component does not inject the data of tune, and the components of the same tune also do not inject the data of block, which leads to the fact that the block or tune component cannot adjust according to the data of the other component when constructing. Whether the data of tune can be injected in the blcok component construction, and the data of blcok can be injected when the tune component is constructed.

The second problem: the corresponding tune component cannot be notified when the data of the block component is modified. For example, I changed the alignment style in the block component through the custom button, and these changes want to be echoed in the tune component. Currently I can't find a way to notify the tune component.

Third problem: Similar to the second problem, the tune component cannot notify the corresponding block component after modifying the data. But I found a way to do it: this.block.call('alignTuneChange', this.data); This can be done by calling a custom method in block.
If anyone can solve my problem, Or editor.js has now implemented the above function, please comment below, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant