feat(Nextjs): Markdown support on text

This commit is contained in:
shiva raj badu 2025-07-19 01:18:54 +05:45
parent 1e9d210954
commit 19b6ecfc5c
No known key found for this signature in database
2 changed files with 2 additions and 3 deletions

View file

@ -40,9 +40,9 @@ const TiptapText: React.FC<TiptapTextProps> = ({
},
},
onBlur: ({ editor }) => {
const text = editor.getText();
const markdown = editor?.storage.markdown.getMarkdown();
if (onContentChange) {
onContentChange(text);
onContentChange(markdown);
}
},
editable: !disabled,

View file

@ -60,7 +60,6 @@ const TiptapTextReplacer: React.FC<TiptapTextReplacerProps> = ({
// 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);