fix: Fixes dividers not rendered in Super PDF exports (#2949)
This commit is contained in:
committed by
GitHub
parent
8af986a0b1
commit
9d79bbfeb0
@@ -12,6 +12,7 @@ import {
|
|||||||
import { $isLinkNode } from '@lexical/link'
|
import { $isLinkNode } from '@lexical/link'
|
||||||
import { $isHeadingNode, type HeadingNode, $isQuoteNode } from '@lexical/rich-text'
|
import { $isHeadingNode, type HeadingNode, $isQuoteNode } from '@lexical/rich-text'
|
||||||
import { $isListNode, $isListItemNode, ListType } from '@lexical/list'
|
import { $isListNode, $isListItemNode, ListType } from '@lexical/list'
|
||||||
|
import { $isHorizontalRuleNode } from '@lexical/react/LexicalHorizontalRuleNode'
|
||||||
import { $isTableNode, $isTableRowNode, $isTableCellNode } from '@lexical/table'
|
import { $isTableNode, $isTableRowNode, $isTableCellNode } from '@lexical/table'
|
||||||
import { $isCodeNode } from '@lexical/code'
|
import { $isCodeNode } from '@lexical/code'
|
||||||
import { $isInlineFileNode } from '../../../Plugins/InlineFilePlugin/InlineFileNode'
|
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)) {
|
if ($isElementNode(node)) {
|
||||||
return {
|
return {
|
||||||
type: 'View',
|
type: 'View',
|
||||||
|
|||||||
Reference in New Issue
Block a user