From 45dbdcaec6d684650f4ee024010c6b2b73f13c47 Mon Sep 17 00:00:00 2001 From: Rojan Rajbhandari Date: Fri, 7 Nov 2025 16:59:16 +0545 Subject: [PATCH 1/3] chore(OUT-2488): add horizontal-rule component --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index b52c7da..c374d11 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "@tippyjs/react": "^4.2.6", "@tiptap/extension-gapcursor": "^2.1.12", "@tiptap/extension-hard-break": "^2.1.13", + "@tiptap/extension-horizontal-rule": "^2.1.13", "@tiptap/extension-image": "^2.1.12", "@tiptap/extension-link": "^2.1.12", "@tiptap/extension-mention": "^2.1.13", From 2267c951276e51bfc6a3f406e6409a7c9885717e Mon Sep 17 00:00:00 2001 From: Rojan Rajbhandari Date: Fri, 7 Nov 2025 16:59:32 +0545 Subject: [PATCH 2/3] feat(OUT-2488): add support for horizontal ruler component --- src/app/components/ClientPreview.tsx | 6 ++++++ src/app/components/EditorInterface.tsx | 13 +++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/app/components/ClientPreview.tsx b/src/app/components/ClientPreview.tsx index 062d78a..a1846aa 100644 --- a/src/app/components/ClientPreview.tsx +++ b/src/app/components/ClientPreview.tsx @@ -42,6 +42,7 @@ import { IframeExtension } from '@/components/tiptap/iframe/ext_iframe' import { defaultBgColor } from '@/utils/constants' import { prepareCustomLabel } from '@/utils/customLabels' import { CustomLabels } from '@/types/common' +import HorizontalRule from '@tiptap/extension-horizontal-rule' const ClientPreview = ({ content, @@ -131,6 +132,11 @@ const ClientPreview = ({ TableHeader, CodeBlock, Code, + HorizontalRule.configure({ + HTMLAttributes: { + class: 'divider', + }, + }), ], content: content || defaultState, }) diff --git a/src/app/components/EditorInterface.tsx b/src/app/components/EditorInterface.tsx index 5ca1775..755124d 100644 --- a/src/app/components/EditorInterface.tsx +++ b/src/app/components/EditorInterface.tsx @@ -32,7 +32,6 @@ import TableHeader from '@tiptap/extension-table-header' import TableRow from '@tiptap/extension-table-row' import Text from '@tiptap/extension-text' import Underline from '@tiptap/extension-underline' -import Handlebars from 'handlebars' import { Scrollbars } from 'react-custom-scrollbars' import { Toaster } from 'react-hot-toast' @@ -40,11 +39,12 @@ import NoteDisplay from '@/components/display/NoteDisplay' import { When } from '@/components/hoc/When' import BubbleMenuContainer from '@/components/tiptap/bubbleMenu/BubbleMenu' import ControlledBubbleMenu from '@/components/tiptap/bubbleMenu/ControlledBubbleMenu' +import HorizontalRule from '@tiptap/extension-horizontal-rule' import LoaderComponent from '@/components/display/Loader' import { AutofillExtension } from '@/components/tiptap/autofieldSelector/ext_autofill' -import { IframeExtension } from '@/components/tiptap/iframe/ext_iframe' import BubbleEmbedInput from '@/components/tiptap/iframe/IFrameInput' +import { IframeExtension } from '@/components/tiptap/iframe/ext_iframe' import BubbleLinkInput from '@/components/tiptap/linkInput/BubbleLinkInput' import { NotificationWidgetExtension } from '@/components/tiptap/notificationWidget/ext_notification_widget' import { useAppDataContext } from '@/hooks/useAppData' @@ -58,12 +58,12 @@ import { } from '@/utils/customLabels' import { ImagePickerUtils } from '@/utils/imagePickerUtils' import { defaultNotificationOptions } from '@/utils/notifications' +import { safeCompile } from '@/utils/safeCompile' +import { preprocessTemplate } from '@/utils/string' import { Delete } from '@mui/icons-material' import { Box } from '@mui/material' import Image from 'next/image' import { defaultState } from '../../../defaultState' -import { preprocessTemplate } from '@/utils/string' -import { safeCompile } from '@/utils/safeCompile' interface IEditorInterface { settings: ISettings | null @@ -166,6 +166,11 @@ const EditorInterface = ({ }), CodeBlock, Code, + HorizontalRule.configure({ + HTMLAttributes: { + class: 'divider', + }, + }), ], content: prepareCustomLabel( settings?.content || defaultState, From f872e5285dbdd82fa51732fb8b56c76928532f5a Mon Sep 17 00:00:00 2001 From: Rojan Rajbhandari Date: Fri, 7 Nov 2025 16:59:51 +0545 Subject: [PATCH 3/3] feat(OUT-2488): add proper styles to hr --- src/app/globals.css | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/app/globals.css b/src/app/globals.css index 505880b..b092483 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -206,3 +206,10 @@ table { height: 0; pointer-events: none; } + +.tiptap .divider { + margin-top: 12px; + margin-bottom: 12px; + border: none; + border-top: 1px solid rgb(96, 96, 106); +}