# UnifiedWriter v5.32.1 Context Menu / Image Toolbar

## Purpose

UnifiedWriter must not rely on the browser's native context menu inside the editor surface. Native menus expose browser-specific commands such as opening or saving an image, and they do not understand UnifiedWriter's Model-first selection state.

v5.32.1 adds a UnifiedWriter-owned context menu for the rendered editor surface. The menu is target-aware:

- image selection: image options, inline/break-text mode, delete image, comment
- table selection: edit cell, merge/split, insert row/column, clear, table properties
- link selection: edit/remove link
- text selection: comment, link, B/I/U, insert image/table

## Image contextual toolbar

Image-specific toolbar buttons are present in the standard toolbar markup but hidden by default. When an inline image is selected, UnifiedWriter adds `unified-writer-image-selected-mode` to the shell root and shows the image tools.

This keeps the Host-facing toolbar stable while making the UI closer to Google Docs, where selected objects expose contextual operations.

## Model-first note

Resize handles, context menus and image selection boxes are transient UI. They are not saved into DocumentModel or `.uwpsx`. Only committed image metadata such as width, alt text and wrap mode is written back to the model.
