fix: Fixes dividers not rendered in Super PDF exports (#2949)

This commit is contained in:
Antonella Sgarlatta
2025-10-27 19:59:41 -03:00
committed by GitHub
parent 8af986a0b1
commit 9d79bbfeb0

View File

@@ -12,6 +12,7 @@ import {
import { $isLinkNode } from '@lexical/link'
import { $isHeadingNode, type HeadingNode, $isQuoteNode } from '@lexical/rich-text'
import { $isListNode, $isListItemNode, ListType } from '@lexical/list'
import { $isHorizontalRuleNode } from '@lexical/react/LexicalHorizontalRuleNode'
import { $isTableNode, $isTableRowNode, $isTableCellNode } from '@lexical/table'
import { $isCodeNode } from '@lexical/code'
import { $isInlineFileNode } from '../../../Plugins/InlineFilePlugin/InlineFileNode'
@@ -394,6 +395,18 @@ const getPDFDataNodeFromLexicalNode = (node: LexicalNode, fontFamilies: FontFami
}
}
if ($isHorizontalRuleNode(node)) {
return {
type: 'View',
style: {
borderBottomWidth: 1,
borderBottomColor: '#cccccc',
marginVertical: 10,
width: '100%',
},
}
}
if ($isElementNode(node)) {
return {
type: 'View',