feat(Nextjs): Markdown support on text
This commit is contained in:
parent
1e9d210954
commit
19b6ecfc5c
2 changed files with 2 additions and 3 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue