feat(playground): register Header tool - #163
Open
Reversean wants to merge 1 commit into
Open
Conversation
Header wasn't wired into the playground, so there was no way to see its config-driven toolbox running in the actual editor rather than only in its own unit tests. Registered with all six levels enabled via config.levels. Getting it to actually work surfaced two bugs: BlockManager.insert flattened a block's data onto its top-level properties instead of nesting it under data, dropping every tool's data on insert; and ToolboxUI.addTool only added one toolbox entry for a tool with several, instead of iterating all of them.
gohabereg
reviewed
Jul 6, 2026
gohabereg
left a comment
Member
There was a problem hiding this comment.
Let's add @editorjs/editorjs pacakge inside the monorepo. Mark it private for now.
This package should import Core and all the Tools and register them. Export the core with registered tools.
Playground should use import from editorjs/editorjs package instead of core.
Registrations inside the core could be removed
Reversean
force-pushed
the
feat/header-api
branch
from
August 26, 2026 15:05
6cc7173 to
0530cb7
Compare
Reversean
force-pushed
the
feat/header-playground
branch
from
August 26, 2026 15:05
d5e8a22 to
9cb59da
Compare
Reversean
force-pushed
the
feat/header-api
branch
from
August 26, 2026 15:16
0530cb7 to
3d40203
Compare
Reversean
force-pushed
the
feat/header-playground
branch
from
August 26, 2026 15:16
9cb59da to
90da5fe
Compare
Reversean
force-pushed
the
feat/header-api
branch
from
August 27, 2026 21:22
f92ecb6 to
a818765
Compare
Reversean
force-pushed
the
feat/header-playground
branch
from
August 27, 2026 21:22
90da5fe to
3e16a1b
Compare
Reversean
force-pushed
the
feat/header-api
branch
from
August 27, 2026 21:39
a818765 to
b6318fd
Compare
Reversean
force-pushed
the
feat/header-playground
branch
from
August 27, 2026 21:39
3e16a1b to
6b1ade6
Compare
Unit Tests
Mutation Tests
|
Reversean
force-pushed
the
feat/header-api
branch
2 times, most recently
from
August 28, 2026 10:17
d357ed7 to
024f958
Compare
Reversean
force-pushed
the
feat/header-playground
branch
2 times, most recently
from
August 28, 2026 10:26
7b85b74 to
5757d78
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Registers @editorjs/header in the playground.
Getting Header to actually render surfaced two bugs, both fixed here.
BlockManager.insertspread a block's data onto the block object's own top-level properties instead of nesting it under data, so every tool lost its data on insert.ToolboxUI.addToolreadtool.options.toolboxand added a single popover entry per tool; it now iteratestool.toolbox, since a tool can define several entries (Header has one per heading level) and only the first ever showed up.