codex-team / codex-team/editor.js
💡 Add DefaultBlockData type to develop customized paragraph blocks
- Dominant language
- TypeScript
- Stars
- 31.9k
- Forks
- 2.2k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
1. Describe a problem.
When splitting a paragraph block, Editor.js makes block data based on [editor-js/paragraph](https://github.com/editor-js/paragraph).
https://github.com/codex-team/editor.js/blob/next/src/components/modules/blockManager.ts#L488
This behavior may occur errors with customized default block.
2. Describe the solution you'd like. Mockups are welcome.
Add `DefaultBlockData` type in Editor.js.
```
interface DefaultBlockData {
text: string;
}
```
See also: https://github.com/hata6502/editorjs-examples/blob/main/examples/ExampleDefaultBlockTool.ts
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.