Releases: codex-team/editor.js
Releases · codex-team/editor.js
v2.29.0-rc.7
Fix
— Inline Toolbar sometimes opened in an incorrect position. Now it will be aligned by the left side of the selected text. And won't overflow the right side of the text column.Fix
— Compiler error "This import is never used as a value and must use 'import type'..." fixed
v2.29.0-rc.6
fix: errors caused by events fired while editor is not initialized yet #2532
v2.29.0-rc.5
New
— Editor Config now has thestyle.nonce
attribute that could be used to allowlist editor style tag for Content Security Policy "style-src"
v2.29.0-rc.4
Fix
— Editor wrapper element growing on the Inline Toolbar close
v2.29.0-rc.3
Fix
—blocks.render()
won't lead theonChange
call in Safari
v2.28.1
v2.29.0-rc.1
Fix
— Layout did not shrink when a large document cleared in ChromeFix
— Multiple Tooltip elements creation fixedFix
— When the focusing Block is out of the viewport, the page will be scrolled.
v2.29.0-rc.0
Fix
— Passing an empty array via initial data or blocks.render()
won't break the editor
v2.28.0
New features
- Block ids now displayed in DOM via a data-id attribute. Could be useful for plugins that want to access a Block's element by id.
- Blocks API — The
blocks.convert(blockId, newType)
API method was added. It allows to convert existing Block to a Block of another type. - Blocks API — The
blocks.insertMany()
API method added. It allows to insert several Blocks to the specified index.
Improvements
- UX — 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.
- UX — The Delete keydown will work like a Backspace when several Blocks are selected.
- UX — If we have two empty Blocks, and press Backspace at the start of the second one, the previous will be removed instead of the current.
- Shortcuts — Tools shortcuts could be used to convert one Block to another.
- UI — Tools shortcuts displayed in the Conversion Toolbar
- UI — Initialization Loader has been removed.
- Styles — Selection style won't override your custom style for
::selection
outside the editor. - Performance — Performance optimizations: initialization speed increased,
blocks.render()
API method optimized. Big documents will be displayed 8x faster. - DX — "Editor saving" log removed
- DX — "I'm ready" log removed
- UI — The stub-block style is simplified.
- UI — If some Block's tool throws an error during construction, we will show Stub block instead of skipping it during render
- onChange — Call of
blocks.clear()
now will trigger onChange with "block-removed" event for all removed blocks. - Blocks API — The
blocks.clear()
now can be awaited. - Types —
BlockMutationType
andBlockMutationEvent
types exported - Blocks API —
blocks.update(id, data)
now can accept partial data object — it will update only passed properties, others will remain the same. - onChange —
blocks.update(id, data)
now will trigger onChange with onlyblock-change
event. - Blocks API —
blocks.update(id, data)
will return a promise with BlockAPI object of the changed block.
v2.28.0-rc.4
Improvement
- Theblocks.clear()
now can be awaited.Improvement
- Theblocks.render()
won't leadonChange
call