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

Add highlight to format types #5001

Merged
merged 2 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/lexical/flow/Lexical.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,8 @@ export type TextFormatType =
| 'italic'
| 'code'
| 'subscript'
| 'superscript';
| 'superscript'
| 'highlight';
type TextModeType = 'normal' | 'token' | 'segmented';

declare export class TextNode extends LexicalNode {
Expand Down
3 changes: 2 additions & 1 deletion packages/lexical/src/nodes/LexicalTextNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ export type TextFormatType =
| 'highlight'
| 'code'
| 'subscript'
| 'superscript';
| 'superscript'
| 'highlight';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you have it twice in this union

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ouch you're right, it's only missing in Flow


export type TextModeType = 'normal' | 'token' | 'segmented';

Expand Down