Skip to content

Add config to updateDOM in ParagraphNode - #3693

Merged
trueadm merged 2 commits into
meta:mainfrom
abelsj60:exposeConfigInUpdateParagraphDOM
Jan 12, 2023
Merged

trueadm merged 2 commits into
meta:mainfrom
abelsj60:exposeConfigInUpdateParagraphDOM

Conversation

@abelsj60

@abelsj60 abelsj60 commented Jan 9, 2023

Copy link
Copy Markdown
Contributor

The standard ParagraphNode does not expose the config property available to its updateDOM method.

This can make for a nasty TypeScript problem when creating a custom ParagraphNode for the replacement API. The reason is that TypeScript will insist that there's no such config property. But there is. This PR will convince TS otherwise!

I encountered this problem while building a LinedCodeNode. This PR is 1/2 that will let it work without patches.

-j

@vercel

vercel Bot commented Jan 9, 2023 •

Copy link
Copy Markdown

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

Name Status Preview Comments Updated
lexical ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 10, 2023 at 1:18AM (UTC)
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 10, 2023 at 1:18AM (UTC)

@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 Jan 9, 2023
@abelsj60

Copy link
Copy Markdown
Contributor Author

@trueadm Sorry, do I need to do something else here? I see the failing and timed out tests, but I'm not sure how this pull request can cause them.

I ran npm run test-e2e-collab-ci-webkit, for example, on my local main branch (a fork), and everything failed or timed out there, too.

Maybe there's something wrong with some of the test suites? Please let me know, I'm at a bit of a loss.

@trueadm
trueadm merged commit 773bada into meta:main Jan 12, 2023
@abelsj60
abelsj60 deleted the exposeConfigInUpdateParagraphDOM branch January 16, 2023 18:08
@trueadm trueadm mentioned this pull request Feb 3, 2023

This branch was successfully deployed

2 active deployments
Preview – lexical-playground — 1e80c9f5 Deployed Jan 10, 2023 by vercel[bot]
Preview – lexical — 1e80c9f5 Deployed Jan 10, 2023 by vercel[bot]
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