codex-team/editor.js
GitHub で見るAPI: improve block.insert() interface to allow passing parameters as an object instead of set
Open
#1,817 opened on 2021年11月24日
good first issue
Repository metrics
- Stars
- (26,602 stars)
- PR merge metrics
- (30d に merged PR はありません)
説明
- Describe a problem.
The current interface of the api.blocks.insert accepts parameters as a list:
this.api.blocks.insert(
toolName,
undefined,
undefined,
index,
undefined,
currentBlock.isEmpty
);
- Describe the solution you'd like. Mockups are welcome.
It would better to pass parameters as an object:
this.api.blocks.insert({
type: toolName,
index,
replace: currentBlock.isEmpty
});
Important. We need to save the backward capability.