codex-team / codex-team/editor.js
API: improve block.insert() interface to allow passing parameters as an object instead of set
Open
good first issue
- Dominant language
- TypeScript
- Stars
- 31.9k
- Forks
- 2.2k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
1. Describe a problem.
The current interface of the `api.blocks.insert` accepts parameters as a list:
```ts
this.api.blocks.insert(
toolName,
undefined,
undefined,
index,
undefined,
currentBlock.isEmpty
);
```
2. Describe the solution you'd like. Mockups are welcome.
It would better to pass parameters as an object:
```ts
this.api.blocks.insert({
type: toolName,
index,
replace: currentBlock.isEmpty
});
```
**Important**. We need to save the backward capability.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.