11 — In the project
Markdown, images and manual
Reading views inside tabs and how they differ from the source editor.
On this page
Markdown
Recognizes .md, .markdown, .mdown and .mkd case-insensitively. Defaults to preview; F4 toggles source and preview, keeping tab content. preview.markdownDefault allows starting in source.
Uses OpenTUI with concealed markers, tables and wrapping. Supported Mermaid becomes Unicode; empty, invalid, unsupported or over-64-KiB blocks remain code. Code is not executed. Use source to edit, format or find; saving from preview retains current content.
Images
PNG, JPG/JPEG, WebP and GIF open in read-only tabs up to 16 MiB. They fit the available area. auto, kitty, sixel or blocks are passed to the renderer; quality and support depend on the terminal.
There is no zoom, rotation or raster editing. With images=false, text reading is attempted and will normally reject binary images; SVG remains editable XML.
SVG: preview and XML editing
SVG opens in preview when preview.images is enabled. F4 toggles editable XML and draft preview without automatically saving. Invalid SVG shows a notice and allows returning to source. Static local rendering with bundled WASM and font: no scripts, DTDs, entities or external images. Up to 2 MiB text and 1600 pixels per raster dimension.
Improved Markdown reading
OEC and the plugin share level-specific headings, visible links, fitted tables and code blocks with language labels, color and indentation. details/summary wrappers are adapted for reading without executing HTML. Saving from preview retains the current tab content.
Embedded manual and scrolling
Open OEC manual from the palette opens an embedded summary, translated by language and always read-only. It does not read the repository’s docs/manual.md file. It has no textarea local search.
In the preview/manual scrollbox, ↑/↓ or j/k scroll, PageUp/PageDown move half a viewport and Home/End go to the boundaries. The F12 log now uses a selectable read-only textarea: select and copy with Ctrl+C, without editing or pasting.
Chapter sources
Links pinned to the reviewed commit; they do not follow main.
src/documents/previews.ts↗src/documents/MarkdownPreview.tsx↗src/documents/MarkdownContent.tsx↗src/documents/markdown.ts↗src/documents/mermaid.ts↗src/documents/ImagePreview.tsx↗src/documents/SvgPreview.tsx↗src/documents/svg.ts↗src/documents/svg-assets.ts↗docs/THIRD-PARTY-NOTICES.txt↗tests/svg.test.ts↗src/logs/LogPane.tsx↗src/docs/manual.ts↗