Conversation
…RDT collab 本次提交包含以下核心功能与体验优化: - feat(toolbar): 新增划词富文本悬浮气泡工具栏 (Bubble Menu) - feat(core): 新增剪贴板智能富文本转 Markdown 粘贴 (Smart HTML Paste) - feat(core): 新增文档大纲视图导航侧边栏 (createOutlineUI) - feat(core): 新增 Notion 风格块级悬浮手柄与无残影拖拽重排 (blockDragExtension) - feat(core): 新增美化 HTML、Word (.doc) 兼容文档及 PDF 打印导出 - feat(collab): 新增基于 Yjs 的独立 CRDT 实时协同插件包 (@floatboat/nexus-plugin-collab) - perf(core): 优化撤销重做 1500ms 自然打字停顿分组,新增 onAstChange 语法树解耦通知 - feat(search): 新增纯内联 fuzzyMatch 模糊序列匹配与连续性评分 - fix(demo): 修复 Electron Demo 中 plugin-math 与 plugin-vim 的 Vite 别名解析
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Introduces high-end editing capabilities to Nexus-Editor, including a floating Bubble Menu, smart HTML-to-Markdown paste, an interactive Outline (TOC) sidebar, Notion-style block drag & reorder, multi-format export (standalone HTML, Word .doc, PDF print), and a new Yjs-based CRDT real-time collaboration plugin.
Motivation
To bridge the gap between raw Markdown editing and modern, Notion/Obsidian-grade editing workflows:
Lower the cognitive barrier of remembering Markdown syntax via floating rich-text actions.
Eliminate messy HTML artifacts when copying content from web pages, Word, or Excel.
Provide document structural awareness and drag-and-drop block reordering.
Enable multi-user collaborative editing with presence awareness and scoped undo/redo.
Expand document export capabilities to styled HTML, Microsoft Word, and print-to-PDF.
Issue:
Roadmap (docs/ROADMAP.md): Phase 1 & 2 Editing Experience & Collaboration
OpenSpec change:
Changes
packages/coresrc/html-to-markdown.ts): Built a zero-dependency DOM-based converter that automatically cleans and converts pastedtext/htmlinto clean GFM Markdown (including headings, nested lists, code blocks, and tables). Configurable viaEditorConfig.smartPaste.src/outline-ui.ts): ImplementedcreateOutlineUIproviding a hierarchical heading tree, live reading cursor highlight tracking, and smooth scroll-to-heading navigation.src/block-drag.ts): AddedblockDragExtensionwith block boundary detection (paragraphs, headings, code blocks, tables, lists), hoverable⋮⋮handle, custom ghost-free mouse drag, and atomic transaction-based block swapping.src/export.ts): AddedexportStandaloneHTML(with GitHub-like typography and print styles),exportWord(Word/WPS-compatible XML document format), andprint(browser/Electron native PDF print dialog trigger).src/editor.ts,src/types.ts): AddedonAstChangecallback to decouple high-frequency text events from AST processing; wired export APIs intoEditorAPI.packages/plugin-toolbarsrc/bubble-menu.ts): ImplementedcreateBubbleMenuUIwhich automatically calculates bounding coordinates and floats above non-empty selections, supporting bold, italic, strikethrough, underline, inline code, link, headings (H2/H3), and text/highlight color pickers.src/toolbar-ui.ts): ExportedshowColorPicker,pickOverlayMount, and default color palettes for shared use.packages/plugin-collab(NEW PACKAGE)@floatboat/nexus-plugin-collabpackage usingyjs,y-codemirror.next, andy-protocols/awareness.Y.UndoManagersoCtrl+Zonly reverts local changes without reverting other peers' edits.linkDocsfor memory linking andLocalBroadcastProviderfor zero-server multi-tab/window sync viaBroadcastChannel.packages/plugin-historynewGroupDelayfrom 500ms to 1500ms to group consecutive typing into natural pause intervals; exposedHistoryPluginOptions.packages/plugin-searchfuzzyMatchalgorithm with run-length continuity scoring, supportingSearchOptions.fuzzyinfindSearchMatches.apps/electron-demo& Workspace@floatboat/nexus-plugin-mathand@floatboat/nexus-plugin-vim.@floatboat/nexus-plugin-collabinvitest.config.tsand rootpackage.jsonbuild scripts; excluded.kilofrom Vitest discovery.Testing
pnpm testpasses / All 25 test suites and 391 unit tests pass (100% green).pnpm build) passes cleanly.packages/core/test/html-to-markdown.test.ts: HTML element conversions, table formatting, editor smart paste.packages/core/test/outline-ui.test.ts: TOC hierarchy, document change syncing, selection jumping.packages/core/test/block-drag.test.ts: Block boundary detection, handle & indicator initialization.packages/core/test/export.test.ts: Standalone HTML generation, Word document structure, print invocation.packages/plugin-toolbar/test/plugin-toolbar.test.ts: Bubble menu mounting, button rendering, selection actions.packages/plugin-collab/test/plugin-collab.test.ts: Yjs two-way sync, multi-client doc linking, awareness presence, collaborative undo.packages/plugin-search/test/plugin-search.test.ts: Inline fuzzy match scoring and ranked match retrieval.packages/core/test/editor.test.ts: AddedonAstChangeindependent callback test.Compliance
yjs@^13.6.24— MIT — CRDT core store for real-time collaboration.y-codemirror.next@^0.3.5— MIT — Official CodeMirror 6 binding for Yjs.y-protocols@^1.0.6— MIT — Awareness and presence protocol..env/ personal vault data committed.Checklist
live-preview-table.ts.