[lexical-playground] Feature: Add PagesExtension#8322
Merged
etrepum merged 33 commits intofacebook:mainfrom Apr 12, 2026
Merged
[lexical-playground] Feature: Add PagesExtension#8322etrepum merged 33 commits intofacebook:mainfrom
etrepum merged 33 commits intofacebook:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
etrepum
reviewed
Apr 9, 2026
Collaborator
etrepum
left a comment
There was a problem hiding this comment.
This is probably one of the most requested features and generally the trickiest to build! I haven't had time to do a close inspection yet, but here are some general notes on the architecture. Basically it could be made a lot less react-dependent (everything but the dropdown UI itself I think) and follow newer lexical conventions more closely to reduce boilerplate required for clone/serialization/etc.
…nfig method for type definition
…from PageSetupNode
… PageBreakPlugin to PageBreakExtension
…dated consistently
…roving page navigation logic. Removed unnecessary dataset checks and refined selection handling for page breaks and previous siblings.
ibastawisi
commented
Apr 12, 2026
…ith 42 updates (facebook#8347) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Bob Ippolito <bob@redivi.com>
etrepum
approved these changes
Apr 12, 2026
Collaborator
etrepum
left a comment
There was a problem hiding this comment.
I think we're good to merge this and any improvements to the TextNode splitting or anything else can be addressed in follow-ups!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request introduces a comprehensive "Pages" feature to the Lexical Playground, adding support for document pagination, page setup, and print-friendly styling. The main changes include new node types for representing pages and their content, a page setup node for configuring size and margins, and significant CSS updates for print output and UI enhancements.
Pages feature and node architecture:
PageNode,PageContentNode, andPageSetupNode, along with supporting types and constants, to represent document pages, their content, and page setup (size, orientation, margins). These nodes manage pagination logic, page measurement, overflow/underflow handling, and serialization. [1] [2] [3] [4] [5] [6]PagesExtensioninto the main playground app, enabling the new pages functionality in the editor. [1] [2]Print and UI enhancements:
These changes lay the foundation for multi-page document editing and WYSIWYG print output in the Lexical Playground.