v2.19.2
codex-team/editor.jsv2.19.2Mar 15, 2021by github-actions[bot]
AI Summary
This release introduces a new API method for toggling block settings, enhances TypeScript type definitions for tools and output data, and includes various improvements and fixes to block management, caret navigation, and sanitizer configurations.
Key Highlights
- Added new `toolbar.toggleBlockSettings()` API method for developers.
- Enhanced TypeScript support with generic types for Tool config and OutputBlockData.
- Refactored Listeners, Events, and Shortcuts modules into utility classes.
- Fixed issues with block cutting stability, multiple editor instances, and sanitizer type definitions.
New Features
- toolbar.toggleBlockSettings() API method
Full Release Notes
- `New` - `toolbar.toggleBlockSettings()` API method added [#1442](https://github.com/codex-team/editor.js/issues/1421). - `Improvements` - A generic type for Tool config added [#1516](https://github.com/codex-team/editor.js/issues/1516) - `Improvements` - Remove unused `force` option in `Caret.navigateNext()` and `Caret.navigatePrevious()` [#857](https://github.com/codex-team/editor.js/issues/857#issuecomment-770363438). - `Improvements` - Remove bundles from the repo [#1541](https://github.com/codex-team/editor.js/pull/1541). - `Improvements` - Document will be scrolled when blocks are selected with `SHIFT+UP` or `SHIFT+DOWN` [#1447](https://github.com/codex-team/editor.js/issues/1447) - `Improvements` - The caret will be set on editor copy/paste [#1470](https://github.com/codex-team/editor.js/pull/1470) - `Improvements` - Added generic types to OutputBlockData [#1551](https://github.com/codex-team/editor.js/issues/1551). - `Fix` - Fix BlockManager.setCurrentBlockByChildNode() with multiple Editor.js instances [#1503](https://github.com/codex-team/editor.js/issues/1503). - `Fix` - Fix an unstable block cut process [#1489](https://github.com/codex-team/editor.js/issues/1489). - `Fix` - Type definition of the Sanitizer config: the sanitize function now contains param definition [#1491](https://github.com/codex-team/editor.js/pull/1491). - `Fix` - Fix unexpected behavior on an empty link pasting [#1348](https://github.com/codex-team/editor.js/issues/1348). - `Fix` - Fix SanitizerConfig type definition [#1513](https://github.com/codex-team/editor.js/issues/1513) - `Fix` - Editor Config now immutable [#1552](https://github.com/codex-team/editor.js/issues/1552). - `Fix` - Fix bubbling on BlockManagers' listener [#1433](https://github.com/codex-team/editor.js/issues/1433). - `Refactoring` - The Listeners module now is util. - `Refactoring` - The Events module now is util. - `Refactoring` - Shortcuts module is util now.