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

[lexical] Chore: Add export of DOMExportOutputMap from lexical #6805

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

Kingscliq
Copy link
Contributor

Description

In the current setup, the DOMExportOutputMap type is not exported from the Lexical core, making it challenging for developers to define custom export configurations in the html property of CreateEditorArgs without re-creating this type from scratch. This process can lead to redundant code and a higher risk of type errors, particularly for configurations that customize DOM export logic.

This PR exports DOMExportOutputMap directly from the Lexical core, allowing developers to use this type immediately in any html.export configurations, which:

  1. Reduces redundant type definitions.
  2. Improves code readability and reusability.
  3. Enhances type safety for custom DOM export setups.

Closes #6802

Test plan

Before

Developers needed to manually define DOMExportOutputMap, increasing the risk of type errors and inconsistencies in custom export configurations.

After

With DOMExportOutputMap now directly accessible from the Lexical core, developers can import and use the type immediately, resulting in cleaner and more robust custom export setups.

Copy link

vercel bot commented Nov 7, 2024

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

Name Status Preview Comments Updated (UTC)
lexical ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 7, 2024 5:22am
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 7, 2024 5:22am

@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 7, 2024
Copy link

github-actions bot commented Nov 7, 2024

size-limit report 📦

Path Size
lexical - cjs 29.92 KB (0%)
lexical - esm 29.78 KB (0%)
@lexical/rich-text - cjs 38.57 KB (0%)
@lexical/rich-text - esm 31.63 KB (0%)
@lexical/plain-text - cjs 37.22 KB (0%)
@lexical/plain-text - esm 28.94 KB (0%)
@lexical/react - cjs 40.33 KB (0%)
@lexical/react - esm 33.06 KB (0%)

@ivailop7 ivailop7 added this pull request to the merge queue Nov 7, 2024
Merged via the queue into facebook:main with commit 76f8569 Nov 7, 2024
38 of 41 checks passed
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.

Export DOMExportOutputMap from Lexical Core to Improve Reusability and Type Safety
3 participants