Skip to content

Commit

Permalink
fix: getOutput function (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
ColaGom authored Dec 26, 2024
1 parent 825f565 commit 90140a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/minimal-tiptap/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const getOutput = (editor: Editor, format: MinimalTiptapProps['output']):
case 'json':
return editor.getJSON()
case 'html':
return editor.getText() ? editor.getHTML() : ''
return editor.isEmpty ? '' : editor.getHTML()
default:
return editor.getText()
}
Expand Down

0 comments on commit 90140a6

Please sign in to comment.