Embed Width Adjuster
unlistedby Silso
Adds data-width attributes to embeds based on aliases (e.g. [[note|wide]]) in Live Preview.
Embed Width Adjuster
Control embedded note widths using aliases in Live Preview.
[!WARNING] This plugin is provided as-is for personal use. The repository is public for anyone who wants to fork and adapt it. Please do not open issues for support or feature requests.
Features
š Width aliases ā Use |wide, |max, or |full to control embed width
⨠Live Preview support ā Works in the editor, not just Reading view
šØ CSS-driven ā Bring your own styles via CSS snippets
[!NOTE] This plugin is inspired by Kepano's Minimal theme image width feature. It extracts that concept for use with any theme.
Usage
Add an alias to your embed:
![[My Note|wide]]
![[Dashboard|max]]
![[Full Width Content|full]]
The plugin adds a data-width attribute to the embed element:
<div class="internal-embed" data-width="wide">...</div>
Required CSS
This plugin only adds the attribute ā you need CSS to define what each width means. Example snippet:
/* Wide: break out of content width slightly */
.internal-embed[data-width="wide"] {
max-width: 100%;
width: 100%;
}
/* Max: full container width */
.internal-embed[data-width="max"] {
max-width: none;
width: calc(100% + 2rem);
margin-left: -1rem;
}
/* Full: viewport width */
.internal-embed[data-width="full"] {
max-width: none;
width: 100vw;
margin-left: calc(50% - 50vw);
}
| Alias | Suggested Use |
|---|---|
wide | Slightly wider than content column |
max | Full container/pane width |
full | Full viewport width |
Installation
Manual
- Download
main.jsandmanifest.jsonfrom the Releases page - Create
.obsidian/plugins/embed-width-adjuster/in your vault - Place the files in that folder
- Enable the plugin in Settings ā Community plugins
BRAT
- Install Obsidian42 - BRAT
- Run
BRAT: Add a beta plugin for testing - Enter this repository URL
Credits
Width alias concept inspired by Minimal Theme by @kepano.
Images
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.