Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support HTML export overrides from config for nested editors. #5267

Merged
merged 1 commit into from
Nov 28, 2023

Conversation

acywatson
Copy link
Contributor

We were overriding the _nodes property for nested editors in LexicalNestedComposer, which meant that the HTML overrides weren't being passed through as expected.

I'm honestly not sure this conditional logic for copying over the nodes from the parent if initialNodes doesn't exist is correct - it seems like we'd want to check for any nodes already registered on the passed-in Editor instance before we just copy from the parent, but I'm not sure what other issues changing that may cause.

This adds support for copying over those overrides in either path. Note that to make this work for nested editors that specify different nodes than the parent, you need to define the initialNodes prop on LexicalNestedComposer.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 22, 2023
Copy link

vercel bot commented Nov 22, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
lexical ✅ Ready (Inspect) Visit Preview Nov 22, 2023 6:47am
lexical-playground ✅ Ready (Inspect) Visit Preview Nov 22, 2023 6:47am

Copy link

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
packages/lexical/dist/Lexical.js 27.67 KB (0%) 554 ms (0%) 233 ms (+29% 🔺) 787 ms
packages/lexical-rich-text/dist/LexicalRichText.js 40.03 KB (0%) 801 ms (0%) 309 ms (+7.69% 🔺) 1.2 s
packages/lexical-plain-text/dist/LexicalPlainText.js 40 KB (0%) 801 ms (0%) 309 ms (+10.99% 🔺) 1.2 s

@acywatson acywatson merged commit 5c7f1b9 into main Nov 28, 2023
43 checks passed
@acywatson acywatson deleted the nested-html branch November 28, 2023 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants