Repository navigation
Releases: ssidimoto/Obsidian-Outline-Plus
Release list
1.0.2
1.0.1
Changes & Fixes
1. Outline now follows Reading Mode
Files: src/views/ScrollTracker.ts, src/views/PreviewScroll.ts (new)
The outline previously listened only to CodeMirror’s scroll events, which are not available in Reading Mode.
It now relies on Obsidian’s markdown-scroll event — the same event used by the native outline. This event works in both Editor and Reading modes and provides the relevant view.
Reading Mode tracking
The active heading is determined by walking through the renderer’s sections and selecting:
The last section whose bounding rectangle is above the center of the viewport.
Using the viewport center rather than its top keeps the behavior consistent with the editor. It also ensures that when clicking a heading — which centers the target — that heading remains active.
The implementation includes:
- Runtime guards for safer integration
- A fallback to the public
previewMode.getScroll()API - A capture-phase
scrolllistener as a last-resort fallback - The fallback listener is enabled only if
markdown-scrollnever fires
2. HTML & Markdown are now rendered in the Outline
File: src/UI/HeadingRenderer.ts (new)
Headings are now rendered through Obsidian’s MarkdownRenderer.render, providing proper support for:
- Bold / italic / inline code
- Inline HTML
- Wikilinks
- Tags
- Highlights
- LaTeX
Everything is handled in a single rendering pass.
Block-marker escaping
One subtle issue is headings that begin with Markdown block syntax, for example:
## 1. Introduction
- Overview
> Note
These markers are escaped before rendering. Otherwise, the Markdown parser could interpret them as an <ol>, <ul>, or <blockquote> instead of rendering the heading as text.
The rendered output is then unwrapped and flattened with CSS so that each outline entry remains on a single line.
Click behavior
Rendered content uses:
pointer-events: none;This prevents links inside a heading from intercepting the click. Clicking anywhere on the outline entry still performs the normal jump-to-heading action.
3. Parameter block font size is now fixed
The root cause was confirmed in Obsidian’s bundle.
updateFontSize() applies:
document.documentElement.style.setProperty(
"font-size",
baseFontSize + "px"
);As a result, any rem-based value inside the popup followed Obsidian’s global font-size setting.
Fix
The popup now pins:
--fop-font-size: 16px;This matches Obsidian’s default font size.
All other sizes are derived from it using calc().
Result:
- At Obsidian’s default font size → behavior is unchanged
- With a custom Obsidian font size → the popup keeps its intended sizing
The same approach is applied to:
--checkbox-sizesince Obsidian defines that value from the checkbox-size slider.
First release of my Plugin !
Minified version of the plugin with main.js, style.css and the manifest