Skip to content

v3.4.0

Choose a tag to compare

@58bits 58bits released this 08 Jun 03:13
· 17 commits to main since this release

Highlights

  • @byline/richtext-lexical — added a document-level "view as markdown source" toggle to the Lexical editor: a capital-M toolbar button (opt-in via the new markdownToggle editor option) that flips the editing surface between the WYSIWYG editor and a raw markdown CodeNode. Conversion runs through a shared BYLINE_TRANSFORMERS set that extends the stock @lexical/markdown transformers with custom handlers for GFM pipe tables and Docusaurus-style :::note … ::: admonitions (note/tip/warning/danger), so those nodes round-trip instead of being dropped. The toggle is aware of the document patch stream: a no-edit round-trip restores the exact captured editor state and records no patch, while edits made in source emit a single field change on toggle-back. The same transformer set is wired into the inline markdown-shortcut plugin so typed shortcuts and the source view stay consistent. Layout and inline-image nodes are not yet round-tripped.

Bug Fixes

  • @byline/richtext-lexical, @byline/admin — code blocks (and the new markdown source view) no longer wrap: lines use white-space: pre and scroll horizontally with a line-number gutter pinned via position: sticky, so the gutter numbers line up with the visible lines. Fixed the min-content layout blowout the wide code block exposed — the editor's flex/grid ancestor chain through the admin form now carries min-width: 0 end to end, so a long unwrapped line scrolls inside the code block instead of stretching the main form column under the sidebar. Also resolves a pre-existing code-block wrapping issue.

All other @byline/* packages bumped to 3.4.0 in lockstep with no behavioural changes this cycle.