# Fork upgrade migration Version `1.0.0` is published under `@conql/codemirror-live-markdown`. Replace the upstream dependency and change imports from `codemirror-live-markdown` to `@conql/codemirror-live-markdown`. Existing named plugin exports remain available; review the behavior changes below when upgrading. | Previous behavior | New behavior / action | | --- | --- | | Manual mousedown/mouseup listeners maintained by each host | Install `editorInteractions`, or use `liveMarkdown()`. Remove redundant host listeners. | | `collapseOnSelectionFacet.of(false)` sometimes still hid markers | `false` consistently means source mode. The default is now live preview. Prefer `markdownModeFacet` / preset `mode`. | | Disabling plugins to get source mode | Use the mode option; the preset also provides read-only reading mode. | | `letter-spacing: -9999px` and tiny-font overrides | Marker hiding uses replacement decorations. Remove host CSS depending on the old geometry hacks. | | Quote source markers overlapped the border and fold arrow | Quote prefixes now keep individual native text slots and turn transparent outside editing. Quote folding controls use the outer gutter. Remove custom negative margins on `.cm-formatting-quote`. | | Dark code colors on a light editor | `editorTheme` supplies light defaults; `darkEditorTheme` supplies dark defaults. | | Highlight variables sometimes interpreted as HSL components | All public `--md-*` variables accept full CSS values: `#fff`, `rgb(...)`, `hsl(...)`, etc. | | Standalone `codeBlockField()` | Keeps its `auto` default. `liveMarkdown()` uses editable `inline` code by default. Explicit `toggle` remains available. | | Inline code header showed MD and Copy buttons | Inline mode reveals fences on click without an MD button. Copy buttons default to off; use `copyButton: true` to opt in. Native selection/copy remains available. | | Missing final line in an incomplete code fence | Incomplete inline fences stay source until closed. Quoted/list code uses every parsed content segment. | | Old `window.katex` integration | Still recognized; prefer awaiting `initMathRenderer()`. Load KaTeX CSS in the host. | | Ordinary `$…$`, `==…==`, `%%…%%` were not consistently parsed | Install `obsidianMarkdown` in your parser, or use the preset. Old backtick formulas and math fences are still accepted. | | Link click immediately navigated | Live-mode click edits source; Ctrl/Cmd-click opens. Reading-mode click opens normally. | | `tableField` and `tableEditorPlugin` installed together | Choose one. The preset's `tables` option handles this. | | Table editing after text inserted before the widget could corrupt text | All cell commits resolve the current table through the DOM and syntax tree. | | Table cells themselves were contenteditable | `.cm-table-cell` is now a child of `th`/`td`, keeping drag handles outside editable text. Update host selectors targeting editable `th`/`td`. | | Escape discarded a table draft in the first upgrade | Escape now commits the draft and exits cell editing, matching the reference interaction. | | `demo` installed an old published library and its own CM tree | Run `npm ci --include=dev` and `npm run demo` from the repository root. Demo scripts delegate there. | | Git install produced a package without `dist` | `prepare: tsup` restores the build. Do not install this source checkout with lifecycle scripts disabled unless you build explicitly. | Required peers now explicitly include `@codemirror/commands`, `@codemirror/search`, `@codemirror/autocomplete` and `@lezer/common` in addition to the existing CodeMirror/Markdown peers. KaTeX and lowlight are optional and external to the built library. Renderer initialization should finish before constructing the editor; initialization alone does not dispatch a redraw to existing views. The preset includes a Markdown language, history, search, folding, line wrapping and formatting shortcuts. For an existing host with its own editor setup, keep using individual exports. `keybindings: false` omits the preset's history/search/folding/keymap group; it does not remove Markdown-language key bindings. Current boundaries: frontmatter has source editing only; note/block embeds and vault services are not implemented. Table drafts commit on blur/navigation, and rich table-cell previews use the existing lightweight inline renderer, which is not a full Obsidian parser. See [INTEGRATION.md](INTEGRATION.md) and [ROADMAP.md](../ROADMAP.md). The subsequent [reference calibration](calibration/2026-09-08/README.zh-CN.md) uses a blue accent and 700 px default body width. In `inline` code mode, entering the block reveals fences without moving the code. The preset's folding controls now appear beside the text on hover, using CodeMirror's existing folding state.