Skip to content

feat: Markdown 编辑器支持搜索和替换#963

Merged
codexu merged 4 commits intodevfrom
feature/tiptap-search-replace
Mar 8, 2026
Merged

feat: Markdown 编辑器支持搜索和替换#963
codexu merged 4 commits intodevfrom
feature/tiptap-search-replace

Conversation

@codexu
Copy link
Copy Markdown
Owner

@codexu codexu commented Mar 8, 2026

No description provided.

codexu and others added 4 commits March 8, 2026 20:38
- 使用 @sereneinserenade/tiptap-search-and-replace 插件
- 创建 SearchReplacePanel 组件,支持搜索、替换、替换全部
- 支持大小写敏感切换
- 使用 Ctrl+F / Cmd+F 快捷键触发搜索

Co-Authored-By: Claude Opus 4.6 <[email protected]>
- 添加错误处理避免 chain.search 为 undefined 报错
- 直接操作状态
- 点击关闭按钮和 ESC storage 清除搜索 都可以关闭面板

Co-Authored-By: Claude Opus 4.6 <[email protected]>
- 将搜索面板移到 EditorContent 外部,避免受编辑器焦点影响
- 移除 runSearchCommand 中的 focus() 调用,防止焦点转移到编辑器

Co-Authored-By: Claude Opus 4.6 <[email protected]>
- 优化导航时保持搜索框焦点
- 添加高亮样式(支持明暗主题)
- 修复 TypeScript 类型错误

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@codexu codexu merged commit 588064f into dev Mar 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant