Skip to content

Commit

Permalink
fix: className in NestedLexicalEditor (#389)
Browse files Browse the repository at this point in the history
* fix: className in NestedLexicalEditor

* Fix cannot read properties of undefined
  • Loading branch information
MrDobi authored Mar 14, 2024
1 parent c220b2f commit df8ac32
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugins/core/NestedLexicalEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import { ContentEditable } from '@lexical/react/LexicalContentEditable.js'
import LexicalErrorBoundary from '@lexical/react/LexicalErrorBoundary.js'
import { LexicalNestedComposer } from '@lexical/react/LexicalNestedComposer.js'
import { RichTextPlugin } from '@lexical/react/LexicalRichTextPlugin.js'
import classNames from 'classnames'
import { lexicalTheme } from '../../styles/lexicalTheme'
import { exportLexicalTreeToMdast } from '../../exportMarkdownFromLexical'
import { importMdastTreeToLexical } from '../../importMarkdownToLexical'
Expand Down Expand Up @@ -320,7 +321,7 @@ export const NestedLexicalEditor = function <T extends Mdast.RootContent>(props:
return (
<LexicalNestedComposer initialEditor={editor}>
<RichTextPlugin
contentEditable={<ContentEditable {...contentEditableProps} className={styles.nestedEditor} />}
contentEditable={<ContentEditable {...contentEditableProps} className={classNames(styles.nestedEditor, contentEditableProps?.className)} />}
placeholder={null}
ErrorBoundary={LexicalErrorBoundary}
/>
Expand Down

0 comments on commit df8ac32

Please sign in to comment.