codex-team / codex-team/editor.js

Can the block and tune components communicate with each other

Open
#2,747 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
31.9k
Forks
2.2k
Avg merge
1d 1h
Merged PRs (30d)
1

Description

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.