Canvas Project Autofit

approved

by Peng He

Zoom canvases on open to fill the viewport width, pinned to the top. Ideal for project boards with many cards. - This plugin has not been manually reviewed by Obsidian staff.

127 downloadsUpdated 1mo agoMIT

Canvas Project Autofit

Zoom Obsidian canvases on open so content fills the viewport width, pinned to the top. Lower rows can stay off-screen — useful for tall project boards with many cards.

Features

  • Auto-fit when opening a canvas (configurable path prefix)
  • Width-first framing instead of Obsidian’s default “fit everything” zoom
  • Overrides canvas zoomToFit while the plugin is active
  • Command palette: Fit canvas to width
  • Optional: click text cards with external links to open them in the browser
  • Settings for path prefix, width fraction, and top padding

Installation

From Obsidian Community Plugins (after submission)

  1. Open Settings → Community plugins.
  2. Browse and search for Canvas Project Autofit.
  3. Install and enable.

Manual install

  1. Download main.js, manifest.json, and styles.css from the latest release.
  2. Create a folder canvas-project-autofit inside your vault’s .obsidian/plugins/.
  3. Copy the three files into that folder.
  4. Enable the plugin under Settings → Community plugins.

Usage

  1. Enable the plugin.
  2. Open a canvas (by default, only paths starting with Projects/ are auto-fitted).
  3. The view zooms so the board width fills the window; the top of the canvas stays visible.

Use the command Fit canvas to width to re-apply the framing on the active canvas.

Settings

SettingDefaultDescription
Canvas path prefixProjects/Limit auto-fit to canvases under this folder. Empty = all canvases.
Width fraction1.0How much of the board width to frame. Lower = more zoomed in.
Top padding16Pixels of space above content when framing.
Clickable external linksonOpen URLs from text cards with a single click.

Development

This plugin is written in plain JavaScript (main.js) for easy inspection and community review. No build step is required.

To develop locally:

  1. Clone this repository into .obsidian/plugins/canvas-project-autofit/ inside a test vault, or symlink it.
  2. Reload Obsidian (Settings → Community plugins → reload).

Submitting to the Community directory

This repository is structured for Obsidian Community plugin submission:

  • manifest.json at repo root (committed on default branch)
  • LICENSE (MIT)
  • README.md with usage instructions
  • GitHub release tagged 1.2.0 (no v prefix) with release assets: main.js, manifest.json, styles.css
  • versions.json maps plugin version → minimum Obsidian version

After publishing a release, sign in at community.obsidian.md, link GitHub, and submit the repository URL under Plugins → New plugin.

License

MIT — see LICENSE.

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.