A block-style editor with clean JSON output
Improvement
— Breaking Change — Batching added to the onChange
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 single onChange
callImprovement
— Pressing "Enter" at the end of a Block won't lead to redundant block-changed
event triggering. Only block-added
event will be dispatched.Fix
— The onChange
won't be triggered with Block Tunes opening and closing.Refactoring
— EventDispatcher
types improved. Now we can pass EventsMap
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 in ModificationObserver
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.Fix
- Several bugs caused by random browser extensionsImprovement
— Package size reduced by removing redundant files.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.Improvement
— The onChange
callback won't be triggered only if all mutations contain nodes with the data-mutation-free
attributes.Refactoring
— Popover class refactored.Improvement
— Toolbox — Number of close()
method calls optimized.Fix
— Types — Remove unnecessary import that creates a dependency on the cypress
.Improvement
— Menu Config — Property label
renamed to title
.Fix
— Paste Module — fix for a problem with specifying of pasteConfig().tags
in upper case #2208.Fix
— Menu Config — Installed tunes are rendered above default tunes again (https://github.com/codex-team/editor.js/issues/2200).