From 19b6ecfc5c5ae752f91bd660cc36462a90232883 Mon Sep 17 00:00:00 2001 From: shiva raj badu Date: Sat, 19 Jul 2025 01:18:54 +0545 Subject: [PATCH] feat(Nextjs): Markdown support on text --- .../app/(presentation-generator)/components/TiptapText.tsx | 4 ++-- .../components/TiptapTextReplacer.tsx | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/servers/nextjs/app/(presentation-generator)/components/TiptapText.tsx b/servers/nextjs/app/(presentation-generator)/components/TiptapText.tsx index aebfdfbf..8b901739 100644 --- a/servers/nextjs/app/(presentation-generator)/components/TiptapText.tsx +++ b/servers/nextjs/app/(presentation-generator)/components/TiptapText.tsx @@ -40,9 +40,9 @@ const TiptapText: React.FC = ({ }, }, onBlur: ({ editor }) => { - const text = editor.getText(); + const markdown = editor?.storage.markdown.getMarkdown(); if (onContentChange) { - onContentChange(text); + onContentChange(markdown); } }, editable: !disabled, diff --git a/servers/nextjs/app/(presentation-generator)/components/TiptapTextReplacer.tsx b/servers/nextjs/app/(presentation-generator)/components/TiptapTextReplacer.tsx index 742473fe..3cceb669 100644 --- a/servers/nextjs/app/(presentation-generator)/components/TiptapTextReplacer.tsx +++ b/servers/nextjs/app/(presentation-generator)/components/TiptapTextReplacer.tsx @@ -60,7 +60,6 @@ const TiptapTextReplacer: React.FC = ({ // Skip certain element types that shouldn't be editable if (shouldSkipElement(htmlElement)) return; - console.log('Making element editable:', trimmedText, htmlElement); // Get all computed styles to preserve them const computedStyles = window.getComputedStyle(htmlElement);