Media Layout

pending

by Hanblade

Drag, resize, and arrange media elements with floating notes and presets.

β˜… 2 starsUpdated 4mo agoMITDiscovered via Obsidian Unofficial Plugins
View on GitHub

Media Layout

A plugin that allows you to freely arrange and resize media elements (videos, images, audio) and note boxes directly on the page. Create visual compositions while maintaining the simplicity and portability of your notes.


Main demo – resize & position media

🎯 Key Features

Working with Media

  • Editing β€” freely edit videos, images, and audio in Live Preview mode
  • In-flow Files β€” edit the size and shape of media directly in the text flow
  • Clones β€” create visual copies of media with their own size and position

πŸ‘₯ Clones

Files in the flow can be detached for free movement throughout the note, but instead it's recommended to clone the desired file and position it where needed. Clones are loaded directly from your disk, so after cloning you can delete the original element from the noteβ€”the clone will be independent of it, but the file itself must exist on disk in your vault.

CLONE CAPABILITIES:

  • πŸ“ Sizing β€” change the size of photos, videos, and audio by dragging special handles or set the desired size using the menu

    screen for ML1
  • ✨ Transformation β€” unlike audio and video, image files can be transformed by holding ctrl and dragging the handles

  • πŸ—ΊοΈ Movement β€” unlike files in the flow, clones can be freely placed anywhere in the note

  • πŸ“‹ Presets β€” by pressing a special button, you can save all clones and note boxes currently in the note to a preset

    сохранСниС страницы
  • βœ… Page Save β€” after saving a page, you can insert it into any other (all clone and note box data is saved, including current position and all presets)

  • πŸ”„ Rotation β€” clones and note boxes can not only be freely moved but also rotated (grid-snapped if holding shift)

ML rotate

  • πŸ”— Link β€” insert a link into an image clone and it will open when clicked (just like a YouTube thumbnail)
  • 🎨 Customization β€” customize clones and note boxes as you like, you can edit background color, text color, transparency, and more Screenshot_5

CLONE STYLING:

Customization

Backgrounds

  • Global Background β€” set background and opacity for all media
  • Local Background ("Only for this file") β€” customize background for individual elements
  • Transparency β€” make the background transparent, leaving only the content

Element Management

Multi-Select and Selection

  • Select Elements β€” Ctrl + Click to select clones and tables
  • Area Selection β€” Ctrl + Drag to select multiple elements with a box
  • Group Movement β€” drag any selected element to move the entire group
  • Bulk Delete β€” delete all selected elements with one action

Locking

  • Protection from Accidental Changes β€” lock elements after configuration

Note Boxes

Create a note box to add text anywhere in the note (background can be removed leaving only text) Π΄ΠΎΠ±Π°Π²Π»Π΅Π½ΠΈΠ΅ Ρ‚Π°Π»ΠΈΡ‡ΠΊΠΈ

  • Font Size on the Fly:
    • Ctrl + Mouse Wheel β€” 10 px step
    • Shift + Mouse Wheel β€” precise 1 px adjustment
  • Color Settings:
    • Table background
    • Header color
    • Text color
    • Border color (uses the currently selected color)

Presets

  • Save Layouts β€” save clones and note boxes together with all their data (positions, sizes, backgrounds, locks, etc.)
  • Apply Presets β€” quickly restore saved compositions
  • Reliability β€” originals remain in the text flow, avoiding conflicts and not interacting with presets at all

βš™οΈ Settings

Open via Command Palette: Media Layout: Settings

List

  • Detach Originals (off by default) β€” allows moving original media outside the flow
  • Handle Visibility β€” make resize handles invisible but active
  • Panel Hide Duration
  • Clone Restore Delay
  • Table Restore Delay
  • Modal Animation β€” smooth open/close

🌍 Localization

Built-in language support: de, pl, es, fr, it, be, uk, uz, vi, zh-CN, zh-TW


πŸ’Ύ Data Storage

Location: .obsidian/plugins/media-layout/

What's Stored: Absolutely all data, including sizes of original files in the flow, clones, settings, backgrounds, note boxes, text, etc.

Automatic Backups

  • Interval: every 10 minutes (when changes are made)
  • Retention: up to 4 files with rotation
  • Format: DD_MM_YYYY_HHκž‰MM_data_backup.json
  • Recovery: replace data.json with the desired backup (with Obsidian closed)

πŸ“– How to Use the Plugin

  1. Enable the plugin in Obsidian settings
  2. Insert media into a note (video/image/audio) or add a note box
  3. Create a clone (recommended for free placement) and work with it as you like
  4. Adjust size and position β€” drag and resize elements
  5. Style β€” set background, opacity, colors (via element menu)
  6. Lock β€” protect elements from accidental changes
Π±Π»ΠΎΠΊΠΈΡ€ΠΎΠ²ΠΊΠ°
  1. Save a preset β€” save the composition so you don't lose it if you accidentally delete any elements, or to try a different composition variant and have the ability to restore the previous one

Saving presets

⚠️ Important to Know

Originals vs Clones

  • Originals β€” located in the Markdown text flow; can be resized; repositioning requires detachment (not recommended)
  • Clones β€” independent visual copies with their own parameters; don't affect the text flow

Recommendation: use clones for creating layouts. It's safer and more stable, as detaching files from the flow can narrow the content display in the noteβ€”this happens due to Obsidian's CodeMirror 6 optimization system.

Limitations and Features

  • Detaching originals may cause visual bugs due to CM6 specifics
  • Reset all settings removes clones and restores originals to the flow
  • Large amounts of heavy media (videos, GIFs) may reduce performance
  • Aggressive CSS or third-party plugins may affect display

❓ FAQ

Do clones duplicate files?
No. Clones reference the same file β€” only display parameters are duplicated.

Will the layout persist after restart?
Yes. Clones and presets are restored automatically.

Can I edit in Reading Mode?
Editing is only available in Live Preview. Reading Mode shows the result with limited interaction.

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.