Skip to content

Commit 9d79bbf

Browse files
authored
fix: Fixes dividers not rendered in Super PDF exports (#2949)
1 parent 8af986a commit 9d79bbf

File tree

1 file changed

+13
-0
lines changed
  • packages/web/src/javascripts/Components/SuperEditor/Lexical/Utils/PDFExport

1 file changed

+13
-0
lines changed

packages/web/src/javascripts/Components/SuperEditor/Lexical/Utils/PDFExport/PDFExport.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
import { $isLinkNode } from '@lexical/link'
1313
import { $isHeadingNode, type HeadingNode, $isQuoteNode } from '@lexical/rich-text'
1414
import { $isListNode, $isListItemNode, ListType } from '@lexical/list'
15+
import { $isHorizontalRuleNode } from '@lexical/react/LexicalHorizontalRuleNode'
1516
import { $isTableNode, $isTableRowNode, $isTableCellNode } from '@lexical/table'
1617
import { $isCodeNode } from '@lexical/code'
1718
import { $isInlineFileNode } from '../../../Plugins/InlineFilePlugin/InlineFileNode'
@@ -394,6 +395,18 @@ const getPDFDataNodeFromLexicalNode = (node: LexicalNode, fontFamilies: FontFami
394395
}
395396
}
396397

398+
if ($isHorizontalRuleNode(node)) {
399+
return {
400+
type: 'View',
401+
style: {
402+
borderBottomWidth: 1,
403+
borderBottomColor: '#cccccc',
404+
marginVertical: 10,
405+
width: '100%',
406+
},
407+
}
408+
}
409+
397410
if ($isElementNode(node)) {
398411
return {
399412
type: 'View',

0 commit comments

Comments
 (0)