Skip to content

Fix the default language style for newly created code blocks#2999

Open
micl2e2 wants to merge 1 commit intostandardnotes:mainfrom
micl2e2:main
Open

Fix the default language style for newly created code blocks#2999
micl2e2 wants to merge 1 commit intostandardnotes:mainfrom
micl2e2:main

Conversation

@micl2e2
Copy link
Copy Markdown

@micl2e2 micl2e2 commented Mar 28, 2026

It seems that most code in CodeOptions.tsx that tries to set default language as 'empty' provides little help, and somehow always fallback to JS (https://github.com/facebook/lexical/blob/5dd93a7c8b4b23d2b00a547c2d860cb17aed1e52/packages/lexical-code-core/src/CodeNode.ts#L52).

I marked this as a "fix" is because line 18 suggests that the plain text type was needed at the very beginning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant