(content)
| 1781 | |
| 1782 | // 过滤编辑器内容,移除多余的<br>标签 |
| 1783 | function filterEditorContent(content) { |
| 1784 | if (!content) return ''; |
| 1785 | // 如果内容只包含空的<br>标签,返回空字符串 |
| 1786 | const cleanContent = content.replace(/<br\s*\/?>/gi, '').trim(); |
| 1787 | if (!cleanContent || cleanContent === '') { |
| 1788 | return ''; |
| 1789 | } |
| 1790 | return content; |
| 1791 | } |
| 1792 | |
| 1793 | function clearEditor(){ |
| 1794 | titleInput.value = ''; |
no outgoing calls
no test coverage detected