Toggle Full Width
unlistedby Martín M.
Toggle any note between readable line length and full width with one click.
Toggle Full Width
An Obsidian plugin that lets you toggle any note between readable line length and full viewport width with a single click.
Usage
- Enable "Readable line length" in Obsidian Settings → Editor
- Open any note
- Toggle full width using one of:
- Command palette: Search for "Toggle full width"
- Status bar: Click the width indicator in the bottom-right corner
- Hotkey: Assign a custom hotkey in Settings → Hotkeys
Toggling adds or removes full-width in the note's cssclasses frontmatter property. This means:
- The setting persists across sessions
- It works even if you disable the plugin (as long as you keep the CSS)
- You can also add
full-widthmanually to any note's frontmatter
Configuration
Open Settings → Community plugins → Toggle Full Width to choose the Width used when full width is enabled: 100%, 90%, or 80%. This is the global default applied to every note carrying the plain full-width class.
Per-note width
To give a single note its own width regardless of the global setting, add one of these preset classes to its cssclasses frontmatter by hand:
---
cssclasses:
- full-width-90
---
| Class | Width |
|---|---|
full-width | Global setting |
full-width-100 | 100% |
full-width-90 | 90% |
full-width-80 | 80% |
When a preset class is present, the status bar shows that note's actual width (e.g. ↔ 90%).
How it works
The plugin ships CSS rules that set --file-line-width on notes carrying a full-width class. The plain full-width class uses the width from the plugin settings; the full-width-100 / full-width-90 / full-width-80 classes use their fixed values. Toggling adds or removes the full-width class from the note's frontmatter.
Requirements
- Obsidian v1.4.0 or later
- "Readable line length" must be enabled (Settings → Editor)
Installation
This plugin is not yet in the Obsidian community plugin store.
Via BRAT (recommended)
- Install the BRAT community plugin
- In BRAT, choose "Add Beta plugin" and enter
skydiver/obsidian-toggle-full-width - Enable "Toggle Full Width" in Settings → Community plugins
Manual
- Download
main.js,manifest.json, andstyles.cssfrom the latest release - Create a folder
.obsidian/plugins/toggle-full-width/in your vault - Copy the three files into that folder
- Enable the plugin in Settings → Community plugins
Development
pnpm install
pnpm run dev # watch mode
pnpm run build # production build
pnpm run lint # check with biome
pnpm run lint:fix # auto-fix
To test locally, symlink the project folder into your vault:
ln -s /path/to/obsidian-toggle-full-width /path/to/vault/.obsidian/plugins/toggle-full-width
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.