codex-team / codex-team/editor.js
Add toHTML() interface for **block copy**💡
- Dominant language
- TypeScript
- Stars
- 31.9k
- Forks
- 2.2k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
1. Describe a problem.
Editor.js doesn't support HTML output, but Editor.js does output a HTML!
There is in the HTML copy function.
https://github.com/codex-team/editor.js/blob/next/src/components/modules/blockSelection.ts#L300
Editor.js output a HTML based on the rendered block holder.
It means each block tools can't include input labels, button, and other UI components.
For example, when copy Image tool and paste to Google Document,
pasted HTML data includes unexpected "Select an Image" text.

2. Describe the solution you'd like. Mockups are welcome.
Add `toHTML()` interface to each block tool.
If `toHTML()` is not implemented, Editor.js outputs the block holder HTML.
Because `toHTML()` is optional method, there is no breaking changes.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.