Releases: codex-team/editor.js
Releases · codex-team/editor.js
v2.28.0-rc.0
New
- Block ids now displayed in DOM via a data-id attribute. Could be useful for plugins that want access a Block's element by id.Improvement
- The Delete keydown at the end of the Block will now work opposite a Backspace at the start. Next Block will be removed (if empty) or merged with the current one.Improvement
- The Delete keydown will work like a Backspace when several Blocks are selected.Improvement
- If we have two empty Blocks, and press Backspace at the start of the second one, the previous will be removed instead of current.
v2.27.2
Fix
-onChange
won't be called when element marked bydata-mutation-free
changes some attribute
v2.27.1
Fix
-onChange
will be called on removing the whole text in a block
v2.27.0
New Features
- Toolbar API — Added a new method for toggling the toolbox.
- Types — Added types for block mutation events
- onChange — Batching added to the
onChange
callback. Now the second argument can contain an array of CustomEvents as well as a single one. Multiple changes made in a short period of time will be batched under a singleonChange
call.
Improvements
- Toolbox — Number of
close()
method calls optimized. - onChange — The
onChange
callback can be muted if all mutations contain nodes with thedata-mutation-free
attribute. - onChange — Pressing "Enter" at the end of a Block won't lead to redundant
block-changed
event triggering. Onlyblock-added
event will be dispatched. - onChange — The block mutation handler is now called on every block change (including background changes), instead of only when a block is focused
- Optimization — Number of caret saving method calls optimized for Block Tunes opening/closing.
- Bundle — Package size reduced by removing redundant files.
Refactorings
- Popover — Refactored the Popover class for better performance and maintenance.
- Build System — Switched from Webpack to Vite as the build system.
- Event Bus —
EventDispatcher
types improved. Now we can passEventsMap
via generic to specify a map of event names and their payloads that can be used in a particular EventDispatcher instance. - Event Bus — All events in common editor Event Bus now have own type declarations.
- Mutation Observer — Removed the block mutation observer from blocks and attached a single observer to the editor's blocks wrapper element.
- Mutation Batching — Removed the debounce from the block mutation handler and used batching instead.
- Dependencies — Upgraded Cypress to v12 and related libraries to the latest versions.
- Dependencies — Upgraded TypeScript to v5.
- CI — Ubuntu container is now used for Edge tests runner.
- CI — Node 16 is used for GitHib Actions.
Bug Fixes
- Fixed several bugs caused by browser extensions. Removed the search for a block's container in the DOM on saving and kept it in memory instead, updating it when the tool changes a container element.
- The
onChange
callback won't trigger when block tunes are opened or closed. - Resolved a compiler error caused by importing the
BlockToolData
type. - Resolved a problem where the document would scroll to the beginning after moving a block above the viewport.
- Tools API —
pasteConfig
getter withfalse
value could be used to disable paste handling by Editor.js core. Could be useful if your tool has its own paste handler.
v2.27.0-rc.5
Improvement
— Breaking Change — Batching added to theonChange
callback. Now the second argument can contain an array of CustomEvents as well as a single one. If several changes will be made in short period of time, they will be batched under the singleonChange
callImprovement
— Pressing "Enter" at the end of a Block won't lead to redundantblock-changed
event triggering. Onlyblock-added
event will be dispatched.Fix
— TheonChange
won't be triggered with Block Tunes opening and closing.Refactoring
—EventDispatcher
types improved. Now we can passEventsMap
via generic to specify a map of event names and their payloads that can be used in a particular EventDispatcher instance.Refactoring
— All events in common editor Event Bus now have own type declarations.Refactoring
— Now Blocks don't have own Mutation Observer. The single observer attached to the editor's blocks wrapper element.ModificationsObserver
listens blocks wrapper changes, then emits an event into the common editor Event Bus. Each Block subscribes to such events and handle those who related to a particular Block.Improvement
— Block's mutation handler now will be called on every block change (including background changes). Previously, it have worked only if a particular Block have been focused.Refactoring
— Debounce have been removed from Block's mutation handler. The batching inModificationObserver
used instead.Improvement
— Number of caret saving method calls optimized for Block Tunes opening/closing.New
— Types for Block mutation events added.Fix
- Several bugs caused by random browser extensions. Now we are not searching for a block's container in the DOM on saving. Instead, we keep it in memory and update it when the tool changes a container element.
v2.27.0-rc.4
Fix
- Several bugs caused by random browser extensions
v2.27.0-rc.3
Improvement
— Package size reduced by removing redundant files.
v2.27.0-rc.2
Fix
— Resolve compiler error from importing the BlockToolData type.Fix
— Resolved a problem when document was being scrolled to the beginning after moving up a Block above the viewport.Improvement
— Package size reduced by removing redundant files.Fix
- Entire block being deleted on backspace key press when the browser has 3rd party grammar checker extension.
v2.27.0-rc.1
Improvement
— TheonChange
callback won't be triggered only if all mutations contain nodes with thedata-mutation-free
attributes.
v2.27.0-rc.0
Refactoring
— Popover class refactored.Improvement
— Toolbox — Number ofclose()
method calls optimized.