From 9d79bbfeb012c854da738dac765787d19cd26513 Mon Sep 17 00:00:00 2001 From: Antonella Sgarlatta Date: Mon, 27 Oct 2025 19:59:41 -0300 Subject: [PATCH] fix: Fixes dividers not rendered in Super PDF exports (#2949) --- .../Lexical/Utils/PDFExport/PDFExport.tsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/web/src/javascripts/Components/SuperEditor/Lexical/Utils/PDFExport/PDFExport.tsx b/packages/web/src/javascripts/Components/SuperEditor/Lexical/Utils/PDFExport/PDFExport.tsx index 27a20824b..388d8a299 100644 --- a/packages/web/src/javascripts/Components/SuperEditor/Lexical/Utils/PDFExport/PDFExport.tsx +++ b/packages/web/src/javascripts/Components/SuperEditor/Lexical/Utils/PDFExport/PDFExport.tsx @@ -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',