fix: 🐛

This commit is contained in:
codytseng
2025-07-11 23:00:45 +08:00
parent 8db655cc37
commit 069ac34b86
4 changed files with 25 additions and 9 deletions

View File

@@ -23,6 +23,10 @@ function _parseEditorJsonToText(node?: JSONContent): string {
return node.text || ''
}
if (node.type === 'hardBreak') {
return '\n'
}
if (Array.isArray(node.content)) {
return (
node.content.map(_parseEditorJsonToText).join('') + (node.type === 'paragraph' ? '\n' : '')